public final class AlignOnPairedAtoms extends Object
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();
Constructor and Description |
---|
AlignOnPairedAtoms() |
Modifier and Type | Method and Description |
---|---|
void |
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 |
findFirst()
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.
|
Molecule |
getAlignedWithNewCoordinates() |
double[][] |
getCoordinatesOfAligned() |
double[][] |
getCoordinatesOfReference() |
double |
getMaxGradLimit() |
Collection<AlignmentMolecule> |
getMolecules() |
chemaxon.marvin.alignment.NodeColor |
getNodeColor() |
AlignmentProperties.NodeType |
getNodeType() |
Molecule |
getReferenceWithNewCoordinates() |
double |
getRmsd() |
int |
getStepLimit() |
int |
getTimeLimit() |
boolean |
isLicensed() |
void |
removeAllPairs()
Removes all user defined atom pairs.
|
void |
removeMolecules() |
void |
setAromatize(boolean arg0)
Deprecated.
|
void |
setConformerCount(int count) |
void |
setConvergenceLimit(double converg) |
void |
setDehidrogenize(boolean arg0)
Deprecated.
|
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 |
setNodeType(AlignmentProperties.NodeType arg0) |
void |
setProgressMonitor(MProgressMonitor arg0) |
void |
setProperty(AlignmentProperties arg0) |
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) |
public void removeMolecules()
public void setReferenceMolecule(Molecule m, boolean flexible) throws chemaxon.marvin.alignment.AlignmentException
m
- reference moleculeflexible
- if true treat this molecule flexible. If false its
conformation is frozen.AlignmentException
public void setMolecules(AlignmentMolecule reference, AlignmentMolecule toAlign)
public void setConformerCount(int count)
public void setMoleculeToAlign(Molecule m, boolean flexible) throws chemaxon.marvin.alignment.AlignmentException
m
- this molecule will be translated and rotatedflexible
- if true treat this molecule flexible. If false its
conformation is frozen.AlignmentException
public double[][] getCoordinatesOfReference()
public double[][] getCoordinatesOfAligned()
public Molecule getReferenceWithNewCoordinates()
public Molecule getAlignedWithNewCoordinates()
public void addAtomPair(int atom0, int atom1, double weight) throws chemaxon.marvin.alignment.AlignmentException
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 pairchemaxon.marvin.alignment.AlignmentException
- if there is no such atompublic void addAtomPair(int atom0, int atom1) throws chemaxon.marvin.alignment.AlignmentException
atom0
- atom seq starting from 0 from the reference moleculeatom1
- atom seq starting from 0 from the other moleculechemaxon.marvin.alignment.AlignmentException
- if there is no such atompublic void findFirst() throws chemaxon.marvin.alignment.AlignmentException
AlignmentException
public void findNext() throws chemaxon.marvin.alignment.AlignmentException
AlignmentException
public double align()
public double getRmsd()
public void removeAllPairs()
public void setConvergenceLimit(double converg)
public void setProperty(AlignmentProperties arg0)
public double getMaxGradLimit()
public AlignmentProperties.NodeType getNodeType()
public chemaxon.marvin.alignment.NodeColor getNodeColor()
@Deprecated public void setAromatize(boolean arg0)
@Deprecated public void setDehidrogenize(boolean arg0)
public void setFlexibleRingSize(int arg0)
public void setFlexibleRingRotatableBondCount(int arg0)
public Collection<AlignmentMolecule> getMolecules()
public boolean isLicensed()
isLicensed
in interface chemaxon.license.Licensable
public void setLicenseEnvironment(String arg0)
setLicenseEnvironment
in interface chemaxon.license.Licensable
public int getStepLimit()
public void setStepLimit(int arg0)
public int getTimeLimit()
public void setNodeType(AlignmentProperties.NodeType arg0)
public void setTimeLimit(int arg0)
public void setProgressMonitor(MProgressMonitor arg0)
public void setProximity(chemaxon.marvin.alignment.AlignmentProperties.ProximityPotentialType arg0)