Package chemaxon.marvin.alignment
Class Alignment
java.lang.Object
chemaxon.marvin.alignment.Alignment
- All Implemented Interfaces:
chemaxon.license.Licensable
3D Alignment aligns two or more 3D molecules onto each other. The
conformation of all molecules can be kept flexible so as to maximize the
molecular overlap or also the input conformation of some of the molecules can
be frozen. Alignment tries to maximize the overlap of atoms of the same type
of different molecules.
Example source
Example source
Molecule[] mols = new Molecule[2]; mols[0] = MolImporter.importMol("CCCCC"); mols[1] = MolImporter.importMol("CCCCCCC"); mols[0].aromatize(); mols[1].aromatize(); Cleaner.clean(mols[0], 3); Cleaner.clean(mols[1], 3); Alignment aa = new Alignment(); aa.addMolecule(mols[0], false, false); // adds a molecule no roatation / no // conformational flexibility aa.addMolecule(mols[1], true, true); // adds a molecule with roatation/ with // conformational flexibility aa.addUserConstraint(0, 3, 1, 4); // optional: add user constraint between atoms // of two different molecules. Any // constraint can be added aa.align(); Molecule result = aa.getMoleculeWithAlignedCoordinates(1); double tanimoto = aa.tanimoto();
- Since:
- 5.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
An atomMap can be added to some of the atoms in MarvinSketch using the single reaction arrow.void
addMolecule
(Molecule m, boolean flexible, boolean enableTranslateAndRotate) Add molecule to alignvoid
addNodeColorWeight
(int t1, int t2, double w) User may define extra weights between colors defined at setColoringScheme.void
addUserConstraint
(int molSeq0, int atomSeq0, int molSeq1, int atomSeq1) Adds user constraint between two atoms of two different molecules The addMol method calls must precede this method.void
align()
3D alignment on two or more molecules.double
getMoleculeWithAlignedCoordinates
(int molID) After the alignment result molecule can be obtained.chemaxon.marvin.alignment.NodeColor
double
getRmsd()
int
int
double
Calculates the volume score between the current orientation and conformation of the two molecules.boolean
static Molecule
Rotates rotatable bonds by a random dihedral angle value.void
void
before every new alignment the molecules have to be removed.void
setAromatize
(boolean arg0) Deprecated, for removal: This API element is subject to removal in a future version.void
void
setConformerCount
(int conformerCount) The the dihedral angles of every flexible molecule should be randomized before alignment.void
void
setDehidrogenize
(boolean arg0) Deprecated, for removal: This API element is subject to removal in a future version.void
setFlexibleRingRotatableBondCount
(int arg0) void
setFlexibleRingSize
(int arg0) void
setLicenseEnvironment
(String arg0) void
setMinimumCommonSize
(int minimumCommonSize) Deprecated, for removal: This API element is subject to removal in a future version.void
setMode
(AlignmentAccuracyMode mode) void
setMolecules
(AlignmentMolecule reference, AlignmentMolecule toAlign) void
void
setOrientationType
(AlignmentProperties.OrientationType orientationType) void
final void
setProperty
(AlignmentProperties props) void
setProximity
(chemaxon.marvin.alignment.AlignmentProperties.ProximityPotentialType arg0) void
setStepLimit
(int arg0) void
setTimeLimit
(int arg0) double
tanimoto()
Calculates the atomic colored volume Tanimoto similarity of two 3D molecules.
-
Constructor Details
-
Alignment
public Alignment() -
Alignment
-
-
Method Details
-
getMoleculeWithAlignedCoordinates
After the alignment result molecule can be obtained.- Parameters:
molID
- input sequence / Which molecule to return.- Returns:
- the result molecule
-
setMode
-
getAlignedMoleculesAsFragments
-
getOrientationType
-
setProperty
-
setConformerCount
public void setConformerCount(int conformerCount) The the dihedral angles of every flexible molecule should be randomized before alignment.- Parameters:
conformerCount
- number of randomized conformations to try to align
-
randomizeRotatableDihedrals
Rotates rotatable bonds by a random dihedral angle value. The resulting conformation is optimized, to avoid steric clashes.- Parameters:
m
- this Molecule object will be cloned and the coordinates will remain intact.r
- parameterizedRandom
object- Returns:
- the Molecule in changed conformation
-
setColoringScheme
-
addNodeColorWeight
public void addNodeColorWeight(int t1, int t2, double w) User may define extra weights between colors defined at setColoringScheme. The default weights are 1 for the same and 0 for the dissimilar types.- Parameters:
t1
- color 1 (Atomtype)t2
- color 2 (Atomtype)w
- weight
-
setDefaultNodeWeightBehavior
-
setOrientationType
-
removeAllConstraints
public void removeAllConstraints() -
removeAllMolecules
public void removeAllMolecules()before every new alignment the molecules have to be removed. -
addMolecule
public void addMolecule(Molecule m, boolean flexible, boolean enableTranslateAndRotate) throws AlignmentException Add molecule to align- Parameters:
m
- Molecule to alignflexible
- if "false" the molecule kept rigid. If "true" the rotatable bonds are rotated to achieve the best alignment.enableTranslateAndRotate
- Turn translation and rotation on if true. If false molecule is frozen.- Throws:
AlignmentException
-
addUserConstraint
public void addUserConstraint(int molSeq0, int atomSeq0, int molSeq1, int atomSeq1) throws AlignmentException Adds user constraint between two atoms of two different molecules The addMol method calls must precede this method.- Throws:
AlignmentException
- if there is no such atom or molecule.
-
tanimoto
Calculates the atomic colored volume Tanimoto similarity of two 3D molecules.- Returns:
- the 3D volume Tanimoto between 0..1 If more than two molecules are added returns -1.
- Throws:
AlignmentException
-
align
3D alignment on two or more molecules. WARNING! The new coordinates are written back to the input molecules.- Throws:
AlignmentException
- if there is an error with the molecule: not 3d or multi-fragment.
-
getVolumeScore
public double getVolumeScore()Calculates the volume score between the current orientation and conformation of the two molecules.- Returns:
- the volume intersection score.
-
getRmsd
public double getRmsd() -
addConstraintsFromUserMappedAtoms
An atomMap can be added to some of the atoms in MarvinSketch using the single reaction arrow. These maps are imported as user pairs.- Throws:
AlignmentException
-
setMolecules
-
setMinimumCommonSize
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setMinimumCommonSize(int minimumCommonSize) Deprecated, for removal: This API element is subject to removal in a future version.No effect. Will be removed in a future release. -
getMaxGradLimit
public double getMaxGradLimit() -
getNodeType
-
getNodeColor
public chemaxon.marvin.alignment.NodeColor getNodeColor() -
setAromatize
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setAromatize(boolean arg0) Deprecated, for removal: This API element is subject to removal in a future version. -
setDehidrogenize
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public void setDehidrogenize(boolean arg0) Deprecated, for removal: This API element is subject to removal in a future version. -
setFlexibleRingSize
public void setFlexibleRingSize(int arg0) -
setFlexibleRingRotatableBondCount
public void setFlexibleRingRotatableBondCount(int arg0) -
getMolecules
-
isLicensed
public boolean isLicensed()- Specified by:
isLicensed
in interfacechemaxon.license.Licensable
-
setLicenseEnvironment
- Specified by:
setLicenseEnvironment
in interfacechemaxon.license.Licensable
-
getStepLimit
public int getStepLimit() -
setStepLimit
public void setStepLimit(int arg0) -
getTimeLimit
public int getTimeLimit() -
setNodeType
-
setTimeLimit
public void setTimeLimit(int arg0) -
setProgressMonitor
-
setProximity
public void setProximity(chemaxon.marvin.alignment.AlignmentProperties.ProximityPotentialType arg0)
-