Exemple #1
0
 internal AbstractStereo(TF focus, IReadOnlyList <TC> carriers, StereoElement value)
 {
     if (focus == null)
     {
         throw new ArgumentNullException(nameof(focus), "Focus of stereochemistry can not be null!");
     }
     if (carriers == null)
     {
         throw new ArgumentNullException(nameof(carriers), "Carriers of the configuration can not be null!");
     }
     if (carriers.Count != value.CarrierLength)
     {
         throw new ArgumentException($"Unexpected number of stereo carriers! expected {value.CarrierLength} was {carriers.Count}");
     }
     foreach (TC carrier in carriers)
     {
         if (carrier == null)
         {
             throw new ArgumentNullException(nameof(carriers), "A carrier was undefined!");
         }
     }
     this.value    = value;
     this.focus    = focus;
     this.carriers = new List <TC>();
     this.carriers.AddRange(carriers);
 }
Exemple #2
0
        private static IStereoElement <IChemObject, IChemObject> NewSquarePlanar(int u, int[] vs, IAtom[] atoms, Configuration c)
        {
            if (vs.Length != 4)
            {
                return(null);
            }

            StereoElement order;

            switch (c.Ordinal)
            {
            case Configuration.O.SP1:
                order = new StereoElement(StereoClass.SquarePlanar, 1);
                break;

            case Configuration.O.SP2:
                order = new StereoElement(StereoClass.SquarePlanar, 2);
                break;

            case Configuration.O.SP3:
                order = new StereoElement(StereoClass.SquarePlanar, 3);
                break;

            default:
                return(null);
            }

            return(new SquarePlanar(atoms[u], new IAtom[] { atoms[vs[0]], atoms[vs[1]], atoms[vs[2]], atoms[vs[3]] }, order));
        }
Exemple #3
0
 /// <inheritdoc/>
 protected override IStereoElement <IBond, IBond> Create(IBond focus, IReadOnlyList <IBond> carriers, StereoElement stereo)
 {
     return(new ExtendedCisTrans(focus, carriers, stereo.Configuration));
 }
 /// <inheritdoc/>
 protected override IStereoElement <IAtom, IAtom> Create(IAtom focus, IReadOnlyList <IAtom> carriers, StereoElement stereo)
 {
     return(new TrigonalBipyramidal(focus, carriers.ToArray(), stereo));
 }
 public TrigonalBipyramidal(IAtom focus, IReadOnlyList <IAtom> carriers, StereoElement stereo)
     : this(focus, carriers, stereo.Configuration.Order())
 {
 }
Exemple #6
0
 protected override IStereoElement <IAtom, IAtom> Create(IAtom focus, IReadOnlyList <IAtom> carriers, StereoElement stereo)
 {
     return(new ExtendedTetrahedral(focus, carriers, stereo));
 }
Exemple #7
0
 public ExtendedTetrahedral(IAtom focus, IEnumerable <IAtom> peripherals, StereoElement stereo)
     : this(focus, peripherals, stereo.Configuration)
 {
 }
 public DoubleBondStereochemistry(IBond stereoBond, IEnumerable <IBond> ligandBonds, StereoElement stereo)
     : this(stereoBond, ligandBonds, stereo.Configuration)
 {
 }
 protected override IStereoElement <IBond, IBond> Create(IBond focus, IReadOnlyList <IBond> carriers, StereoElement stereo)
 {
     return(new DoubleBondStereochemistry(focus, carriers, stereo));
 }
Exemple #10
0
 /// <inheritdoc/>
 protected override IStereoElement <IAtom, IAtom> Create(IAtom focus, IReadOnlyList <IAtom> carriers, StereoElement stereo)
 {
     return(new SquarePlanar(focus, carriers.ToArray(), stereo));
 }
Exemple #11
0
 public SquarePlanar(IAtom focus, IAtom[] carriers, StereoElement stereo)
     : this(focus, carriers, stereo.Configuration.Order())
 {
 }
Exemple #12
0
 public Octahedral(IAtom focus, IAtom[] carriers, StereoElement stereo)
     : this(focus, carriers, stereo.Configuration.Order())
 {
 }
Exemple #13
0
 /// <inheritdoc/>
 protected override IStereoElement <IBond, IAtom> Create(IBond focus, IReadOnlyList <IAtom> carriers, StereoElement stereo)
 {
     return(new Atropisomeric(focus, carriers.ToArray(), stereo.Configuration));
 }
Exemple #14
0
 public TetrahedralChirality(IAtom chiralAtom, IReadOnlyList <IAtom> ligands, StereoElement stereo)
     : this(chiralAtom, ligands, stereo.Configuration)
 {
 }