Package org.openscience.cdk.tools
Enum SugarRemovalUtility.PreservationMode
- java.lang.Object
-
- java.lang.Enum<SugarRemovalUtility.PreservationMode>
-
- org.openscience.cdk.tools.SugarRemovalUtility.PreservationMode
-
- All Implemented Interfaces:
Serializable
,Comparable<SugarRemovalUtility.PreservationMode>
- Enclosing class:
- SugarRemovalUtility
public static enum SugarRemovalUtility.PreservationMode extends Enum<SugarRemovalUtility.PreservationMode>
Enum with options for how to determine whether a substructure that gets disconnected from the molecule during the removal of a sugar moiety should be preserved or can get removed along with the sugar.
The set option plays a major role in discriminating terminal and non-terminal sugar moieties. If only terminal sugar moieties are removed from the molecule, any disconnected structure resulting from a removal step must be too small to keep according to the set preservation mode option and the set threshold and is cleared away. If all the sugar moieties are to be removed from the given molecule (including non-terminal ones), those disconnected structures that are too small are only cleared once at the end of the routine.
Also, the set preservation mode threshold interrelates with this option. It specifies at least how many heavy atoms or what minimum molecular weight a disconnected structure needs to have to be preserved (depending on the set option).Important Note for further development: If an option is added here, it needs to have a treatment in the method
SugarRemovalUtility.isTooSmallToPreserve(IAtomContainer)
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL
Specifies that all structures should be preserved.HEAVY_ATOM_COUNT
Specifies that whether a structure is worth preserving will be judged by its heavy atom count.MOLECULAR_WEIGHT
Specifies that whether a structure is worth preserving will be judged by its molecular weight.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDefaultThreshold()
Returns the default threshold to preserve a structure (inclusive) for this option.static SugarRemovalUtility.PreservationMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static SugarRemovalUtility.PreservationMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALL
public static final SugarRemovalUtility.PreservationMode ALL
Specifies that all structures should be preserved. Note that if this option is combined with the removal of only terminal moieties, even the smallest attached structure will prevent the removal of a sugar. The most important consequence is that circular sugars with any hydroxy groups will not be removed because these are not considered as part of the sugar moiety.
-
HEAVY_ATOM_COUNT
public static final SugarRemovalUtility.PreservationMode HEAVY_ATOM_COUNT
Specifies that whether a structure is worth preserving will be judged by its heavy atom count. The default threshold to preserve a structure is set to 5 heavy atoms (inclusive).
-
MOLECULAR_WEIGHT
public static final SugarRemovalUtility.PreservationMode MOLECULAR_WEIGHT
Specifies that whether a structure is worth preserving will be judged by its molecular weight. The default threshold to preserve a structure is set to 60 Da (= 5 carbon atoms, inclusive).
-
-
Method Detail
-
values
public static SugarRemovalUtility.PreservationMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SugarRemovalUtility.PreservationMode c : SugarRemovalUtility.PreservationMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SugarRemovalUtility.PreservationMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getDefaultThreshold
public int getDefaultThreshold()
Returns the default threshold to preserve a structure (inclusive) for this option.- Returns:
- the default threshold
-
-