Package chemaxon.marvin.alignment
Class AlignOnPairedAtoms
java.lang.Object
chemaxon.marvin.alignment.AlignOnPairedAtoms
- All Implemented Interfaces:
chemaxon.license.Licensable
Overlays two molecules using the user defined atom pairs
Example:
Example:
Molecule mRef = null; Molecule m = null; AlignOnPairedAtoms ap = new AlignOnPairedAtoms(); ap.setReferenceMolecule(mRef, false); // reference will be kept rigid ap.setMoleculeToAlign(m, true); // this will be kept flexible // add pairs where you want for (int i = 0; i < m.getAtomCount(); i++) { p.addAtomPair(i, i); } ap.findFirst(); // aligns in the input conformation ap.findNext(); // randomizes the flexible molecules if flexible alignment // selected and aligns. System.out.println("rmsd: " + p.getRmsd()); Molecule result = p.getAlignedWithNewCoordinates();
- Since:
- marvin 5.2.3
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAtomPair
(int atom0, int atom1) Adds an alignment constraint between the reference and aligned molecule.void
addAtomPair
(int atom0, int atom1, double weight) Adds an alignment constraint between the reference and aligned molecule.double
align()
void
Overlays the molecule to align on the reference using the predefined atom pairs.void
findNext()
Randomizes dihedral angles of the input conformation for flexible molecules and aligns.double[][]
double[][]
double
chemaxon.marvin.alignment.NodeColor
double
getRmsd()
int
int
boolean
void
Removes all user defined atom pairs.void
void
setAromatize
(boolean arg0) Deprecated, for removal: This API element is subject to removal in a future version.void
setConformerCount
(int count) void
setConvergenceLimit
(double converg) 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
setMolecules
(AlignmentMolecule reference, AlignmentMolecule toAlign) void
setMoleculeToAlign
(Molecule m, boolean flexible) Sets the molecule to align to the reference.void
void
void
void
setProximity
(chemaxon.marvin.alignment.AlignmentProperties.ProximityPotentialType arg0) void
setReferenceMolecule
(Molecule m, boolean flexible) Sets the reference molecule to align to.void
setStepLimit
(int arg0) void
setTimeLimit
(int arg0)
-
Constructor Details
-
AlignOnPairedAtoms
public AlignOnPairedAtoms()
-
-
Method Details
-
removeMolecules
public void removeMolecules() -
setReferenceMolecule
Sets the reference molecule to align to. All previously added molecules are removed.- Parameters:
m
- reference moleculeflexible
- if true treat this molecule flexible. If false its conformation is frozen.- Throws:
AlignmentException
-
setMolecules
-
setConformerCount
public void setConformerCount(int count) -
setMoleculeToAlign
Sets the molecule to align to the reference.- Parameters:
m
- this molecule will be translated and rotatedflexible
- if true treat this molecule flexible. If false its conformation is frozen.- Throws:
AlignmentException
-
getCoordinatesOfReference
public double[][] getCoordinatesOfReference() -
getCoordinatesOfAligned
public double[][] getCoordinatesOfAligned() -
getReferenceWithNewCoordinates
-
getAlignedWithNewCoordinates
-
addAtomPair
Adds an alignment constraint between the reference and aligned molecule. Both molecules must be added beforehand.- Parameters:
atom0
- atom seq starting from 0 from the reference moleculeatom1
- atom seq starting from 0 from the other moleculeweight
- weight of the constraint of this pair- Throws:
AlignmentException
- if there is no such atom
-
addAtomPair
Adds an alignment constraint between the reference and aligned molecule. Both molecules must be added beforehand.- Parameters:
atom0
- atom seq starting from 0 from the reference moleculeatom1
- atom seq starting from 0 from the other molecule- Throws:
AlignmentException
- if there is no such atom
-
findFirst
Overlays the molecule to align on the reference using the predefined atom pairs.- Throws:
AlignmentException
-
findNext
Randomizes dihedral angles of the input conformation for flexible molecules and aligns. If only rigid molecules selected does nothing.- Throws:
AlignmentException
-
align
public double align() -
getRmsd
public double getRmsd()- Returns:
- the root mean square deviation of the current orientation of the two molecules.
-
removeAllPairs
public void removeAllPairs()Removes all user defined atom pairs. -
setConvergenceLimit
public void setConvergenceLimit(double converg) -
setProperty
-
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)
-