public static TetrahedralStereo ToStereo(this StereoConfigurations configure) { switch (configure) { case StereoConfigurations.Left: return(AntiClockwise); case StereoConfigurations.Right: return(Clockwise); default: throw new System.ArgumentException("Cannot map to enum value: " + configure); } }
/// <summary> /// Access the parity (odd/even) parity of the double bond configuration (together/opposite). /// </summary> /// <param name="config">double bond element</param> /// <returns>together = -1, opposite = +1</returns> private static int Parity(StereoConfigurations config) { switch (config) { case StereoConfigurations.Together: return(-1); case StereoConfigurations.Opposite: return(+1); default: return(0); } }
public static DoubleBondConformation ToConformation(this StereoConfigurations configure) { switch (configure) { case StereoConfigurations.Unset: return(DoubleBondConformation.Unset); case StereoConfigurations.Together: return(DoubleBondConformation.Together); case StereoConfigurations.Opposite: return(DoubleBondConformation.Opposite); default: throw new ArgumentException($"Cannot map enum to config: {configure}"); } }
public ExtendedCisTrans(IBond focus, IReadOnlyList <IBond> peripherals, StereoConfigurations config) : base(focus, peripherals, new StereoElement(StereoClass.Cumulene, config)) { }
public ExtendedTetrahedral(IAtom focus, IEnumerable <IAtom> peripherals, StereoConfigurations configure) : base(focus, peripherals.ToReadOnlyList(), new StereoElement(StereoClass.Allenal, configure)) { }
public DoubleBondStereochemistry(IBond stereoBond, IEnumerable <IBond> ligandBonds, StereoConfigurations configure) : base(stereoBond, ligandBonds.ToReadOnlyList(), new StereoElement(StereoClass.CisTrans, configure)) { }
/// <summary> /// Define a new atropisomer using the focus bond and the carrier atoms. /// </summary> /// <param name="focus">the focus bond</param> /// <param name="carriers">the carriers</param> /// <param name="value">the configuration <see cref="StereoConfigurations.Left"/> or <see cref="StereoConfigurations.Right"/></param> public Atropisomeric(IBond focus, IEnumerable <IAtom> carriers, StereoConfigurations value) : base(focus, carriers.ToReadOnlyList(), new StereoElement(StereoClass.Atropisomeric, value)) { }
public TetrahedralChirality(IAtom chiralAtom, IReadOnlyList <IAtom> ligands, StereoConfigurations configure) : base(chiralAtom, ligands.ToReadOnlyList(), new StereoElement(StereoClass.Tetrahedral, configure)) { }
public static StereoConfigurations Flip(this StereoConfigurations value) { return((StereoConfigurations)((int)value ^ 0x3)); }
/// <summary> /// The configuration order of the stereochemistry. /// </summary> public static short Order(this StereoConfigurations value) => (short)value;
public StereoElement(StereoClass cls, StereoConfigurations configure) { this.Class = cls; this.Configuration = configure; }
public StereoElement(StereoConfigurations configure) { this.Class = StereoClass.Unset; this.Configuration = configure; }
public StereoElement(StereoClass cls) { this.Class = cls; this.Configuration = StereoConfigurations.Unset; }