Package com.chemaxon.search.mcs
Class McsSearchOptions
- java.lang.Object
-
- com.chemaxon.search.MatchingOptions
-
- com.chemaxon.search.mcs.McsSearchOptions
-
@PublicAPI public final class McsSearchOptions extends MatchingOptions
Options class forMaxCommonSubstructure
(MCS) search. Instances of this class are immutable, they can be created using theMcsSearchOptions.Builder
nested class. For example,McsSearchOptions searchOpts = new McsSearchOptions.Builder().chargeMatching(true).build();
There are various options for specifying when the atoms and bonds of the two molecules can be matched with each other. By default, only atom and bond types are considered, but other properties can also be taken into account optionally (e.g. charge, isotope, radical).
MCS algorithms can search for connected and disconnected common substructures as well. The latter one is the default, which means that the common substructures could consist of more than one fragment. A minimum required size can be specified for these fragments, but the largest fragment is kept regardless of the specified minimum size.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
McsSearchOptions.Builder
Builder class for creating immutable instances of the enclosingMcsSearchOptions
class.
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_CONSIDERED_RING_SIZE
Default value forMcsSearchOptions.Builder.maxConsideredRingSize(int)
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static McsSearchOptions
getDefault()
Returns the default search options object.int
getMaxConsideredRingSize()
Gets the maximum size of rings considered during search for the specified ring handling mode.int
getMinFragmentSize()
Gets the minimum required size of the fragments of the common substructures.RingHandlingMode
getRingHandlingMode()
Gets the ring handling mode specified.boolean
isConnectedMode()
Gets whether the common substructures should be connected or they can consist of multiple fragments.-
Methods inherited from class com.chemaxon.search.MatchingOptions
getCustomMatching, isAtomMapMatching, isAtomTypeMatching, isBondTypeMatching, isChargeMatching, isExactQueryAtomMatching, isExactQueryBondMatching, isIsotopeMatching, isOrderSensitiveSearch, isRadicalMatching
-
-
-
-
Field Detail
-
DEFAULT_MAX_CONSIDERED_RING_SIZE
public static final int DEFAULT_MAX_CONSIDERED_RING_SIZE
Default value forMcsSearchOptions.Builder.maxConsideredRingSize(int)
.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefault
public static McsSearchOptions getDefault()
Returns the default search options object. It is the same asnew SearchOptions.Builder().build()
, but it does not create a new object, it returns the same immutableMcsSearchOptions
instance for each call.- Returns:
- the default search options
-
getRingHandlingMode
public RingHandlingMode getRingHandlingMode()
Gets the ring handling mode specified.- Returns:
- the ring handling mode (not null)
-
getMaxConsideredRingSize
public int getMaxConsideredRingSize()
Gets the maximum size of rings considered during search for the specified ring handling mode.- Returns:
- the maximum considered ring size
- See Also:
RingHandlingMode
-
isConnectedMode
public boolean isConnectedMode()
Gets whether the common substructures should be connected or they can consist of multiple fragments. SeeMcsSearchOptions.Builder.connectedMode(boolean)
.- Returns:
- true if the search is for a connected common substructure
-
getMinFragmentSize
public int getMinFragmentSize()
Gets the minimum required size of the fragments of the common substructures. Fragments having less bonds than this limit are ignored, except for one largest fragment found. SeeMcsSearchOptions.Builder.minFragmentSize(int)
.- Returns:
- minimum required bond count in additional fragments (except for the largest one)
-
-