Class 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 Detail

      • 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.absent()
         3D verify:                    false
         3D output:                    false
         
        Returns:
        a new StereoisomerSettings object
      • 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 com.google.common.base.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
      • 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.
        Parameters:
        verify3d -
        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)
        Parameters:
        outputIn3d -
        Returns:
        a StereoisomerSettings formed from this and the specified settings