Class StereoisomerSettings

java.lang.Object
com.chemaxon.calculations.stereoisomers.StereoisomerSettings

@PublicApi public class StereoisomerSettings extends Object
Settings class for StereoisomerEnumeration.

Usage example:

 // create and set a new instance
 StereoisomerSettings settings = StereoisomerSettings.create()
         .setStereoisomerType(EnumSet.of(StereoisomerType.CISTRANS))   // only double bond stereoisomers are generated
         .setProtectTetrahedralStereo(true)                            // protect tetrahedral stereocenters
         .setVerify3d(true);                                           // invalid 3D structures are fitered

 // use these settings when a new enumeration is constructed
 StereoisomerEnumeration enumeration = new StereoisomerEnumeration(molecule, settings);
 
Since:
Marvin 14.12.15
  • Method Details

    • create

      public static StereoisomerSettings create()
      Constructs a new StereoisomerSettings object with default settings.

      Defaults:

       Types:                        EnumSet.allOf(StereoisomerType.class)
       Protect tetrahedral stereo:   false
       Protect double bond stereo:   false
       Max stereoisomer count:       Optional.empty()
       3D verify:                    false
       3D output:                    false
       
      Returns:
      a new StereoisomerSettings object
    • stereoisomerTypes

      public EnumSet<StereoisomerSettings.StereoisomerType> stereoisomerTypes()
      Returns the type of generated stereoisomers.
      Returns:
      an EnumSet which contains the stereoisomerism types
      See Also:
    • protectTetrahedralStereo

      public boolean protectTetrahedralStereo()
      Returns the adjusted tetrahedral stereo protection flag.
      Returns:
      true if protects the tetrahedral stereo centers
    • protectDoubleBondStereo

      public boolean protectDoubleBondStereo()
      Returns the adjusted double bond stereo protection flag.
      Returns:
      true if protects the double bond stereo centers
    • maxStereoisomerCount

      public Optional<Integer> maxStereoisomerCount()
      Returns the adjusted maximum number of generated stereoisomers or Optional#absent().
      Returns:
      an Optional object which contains the adjusted value
    • verify3d

      public boolean verify3d()
      Returns true if 3D structure will be checked for a valid stereo conformation.
      Returns:
      the adjusted value
    • outputIn3d

      public boolean outputIn3d()
      Returns true if 3D structures will be generated.
      Returns:
      the adjusted value
    • setStereoisomerType

      Sets which types of stereoisomers should be generated.

      Available values:

      Parameters:
      types - are the stereoisomerism types (represented by an enumset)
      Returns:
      a StereoisomerSettings formed from this and the specified settings
      See Also:
    • setProtectTetrahedralStereo

      public StereoisomerSettings setProtectTetrahedralStereo(boolean protectTetrahedralStereo)
      Sets the protection of tetrahedral stereo centers.

      If true then stereo configuration of tetrahedral stereo centers with preset stereo information will not be changed.

      Parameters:
      protectTetrahedralStereo - is true if preset tetrahedral stereo centers should be protected
      Returns:
      a StereoisomerSettings formed from this and the specified settings
    • setProtectDoubleBondStereo

      public StereoisomerSettings setProtectDoubleBondStereo(boolean protectDoubleBondStereo)
      Sets double bond stereo protection.

      If true then the stereo configuration of double bonds with preset stereo information will not be changed.

      Parameters:
      protectDoubleBondStereo - is true if preset double bond stereo information should be protected
      Returns:
      a StereoisomerSettings formed from this and the specified settings
    • setMaxStereoisomerCount

      public StereoisomerSettings setMaxStereoisomerCount(int maxStereoisomerCount)
      Sets the maxinum number of stereoisomers to be generated.

      If not set the StereoisomerEnumeration generates all stereoisomers of the molecule. It is recommended to use when there are too much stereoisomers to fit to the memory.

      Parameters:
      maxStereoisomerCount - the number of stereoisomers to be generated
      Returns:
      a StereoisomerSettings formed from this and the specified settings
    • setVerify3d

      public StereoisomerSettings setVerify3d(boolean verify3d)
      Invalid 3D structures of generated stereoisomers are filtered.
      Returns:
      a StereoisomerSettings formed from this and the specified settings
    • setOutputIn3d

      public StereoisomerSettings setOutputIn3d(boolean outputIn3d)
      3D structures are generated (invalid 3D structure are filtered)
      Returns:
      a StereoisomerSettings formed from this and the specified settings
    • toString

      public String toString()
      Overrides:
      toString in class Object