Package com.actelion.research.chem.mcs
Class MCS
- java.lang.Object
-
- com.actelion.research.chem.mcs.MCS
-
public class MCS extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
PAR_CLEAVE_RINGS
static int
PAR_KEEP_AROMATIC_RINGS
static int
PAR_KEEP_RINGS
-
Constructor Summary
Constructors Constructor Description MCS()
MCS(int ringStatus)
MCS(int ringStatus, SSSearcher searcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.LinkedList<StereoMolecule>
getAllCommonSubstructures()
All molecules which are sub structures of an other molecule in the list are removed.int[]
getArrMatchListFrag2Mol()
delivers the match list indices from getMCSBondArray(...) index is the Fragment atom index, value is the matched atom index in molecule.StereoMolecule
getMCS()
boolean[][]
getMCSBondArray(boolean[] arrBondMCSMol, boolean[] arrBondFrag)
Calculates the bond arrays for molecule and fragment for their maximum common substructure.double
getScore()
Calculates the score by bonds_mcs/Max(bonds_mol, bonds_frag)boolean
isConsiderAromaticRings()
boolean
isConsiderRings()
void
set(StereoMolecule mol, StereoMolecule frag)
mol should contain equal or more bonds than frag.void
set(StereoMolecule mol, StereoMolecule frag, boolean[] excluded)
mol should contain equal or more bonds than frag.void
setSSSearcher(SSSearcher sss)
-
-
-
Field Detail
-
PAR_CLEAVE_RINGS
public static final int PAR_CLEAVE_RINGS
- See Also:
- Constant Field Values
-
PAR_KEEP_RINGS
public static final int PAR_KEEP_RINGS
- See Also:
- Constant Field Values
-
PAR_KEEP_AROMATIC_RINGS
public static final int PAR_KEEP_AROMATIC_RINGS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MCS
public MCS()
-
MCS
public MCS(int ringStatus)
-
MCS
public MCS(int ringStatus, SSSearcher searcher)
-
-
Method Detail
-
setSSSearcher
public void setSSSearcher(SSSearcher sss)
-
set
public void set(StereoMolecule mol, StereoMolecule frag)
mol should contain equal or more bonds than frag.- Parameters:
mol
-frag
-
-
set
public void set(StereoMolecule mol, StereoMolecule frag, boolean[] excluded)
mol should contain equal or more bonds than frag. If frag contains more than one molecule only the biggest one is considered.- Parameters:
mol
-frag
-excluded
-
-
getAllCommonSubstructures
public java.util.LinkedList<StereoMolecule> getAllCommonSubstructures()
All molecules which are sub structures of an other molecule in the list are removed.- Returns:
-
getMCS
public StereoMolecule getMCS()
- Returns:
- maximum common substructure at top of list or null of none common MCS was found.
-
getMCSBondArray
public boolean[][] getMCSBondArray(boolean[] arrBondMCSMol, boolean[] arrBondFrag)
Calculates the bond arrays for molecule and fragment for their maximum common substructure.- Parameters:
arrBondMCSMol
- result array. Null or initialized with the length number of bonds in molecule.arrBondFrag
- result array. Null or initialized with the length number of bonds in fragment.- Returns:
- two arrays, in the first array the bits are set 'true' which corresponds to the bonds for maximum common substructure in the molecule. In the second are the bits set 'true' which corresponds to the bonds for maximum common substructure in the fragment.
-
getArrMatchListFrag2Mol
public int[] getArrMatchListFrag2Mol()
delivers the match list indices from getMCSBondArray(...) index is the Fragment atom index, value is the matched atom index in molecule.- Returns:
- null if no match was found.
-
getScore
public double getScore()
Calculates the score by bonds_mcs/Max(bonds_mol, bonds_frag)- Returns:
- 1 if full overlap and 0 if no overlap at all.
-
isConsiderAromaticRings
public boolean isConsiderAromaticRings()
-
isConsiderRings
public boolean isConsiderRings()
-
-