Package org.openmolecules.chem.conf.so
Class ConformationRule
- java.lang.Object
-
- org.openmolecules.chem.conf.so.ConformationRule
-
- Direct Known Subclasses:
AxialStereoRule,DistanceRule,PlaneRule,StraightLineRule,TetrahedralStereoRule,TorsionRule
public abstract class ConformationRule extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]mAtomprotected booleanmIsEnabledstatic java.lang.String[]RULE_NAMEstatic intRULE_TYPE_BINAPstatic intRULE_TYPE_DISTANCEstatic intRULE_TYPE_LINEstatic intRULE_TYPE_PLANEstatic intRULE_TYPE_STEREOstatic intRULE_TYPE_TORSION
-
Constructor Summary
Constructors Constructor Description ConformationRule(int[] atom)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddAtomList(java.lang.StringBuilder sb)abstract doubleaddStrain(Conformer conformer, double[] atomStrain)abstract booleanapply(Conformer conformer, double cycleFactor)protected int[]getAtomList()abstract intgetRuleType()booleanisEnabled()protected voidmoveAtomWithUnboundedNeighbors(Conformer conformer, int atom, double dx, double dy, double dz)protected voidmoveGroup(Conformer conformer, int atom, int[] notList, double dx, double dy, double dz)Move one atom and all non-ring-bond substituents, provided attachment atom is not part of the notList.protected voidmoveSubstituent(Conformer conformer, int rootAtom, int firstAtom, double dx, double dy, double dz)Moves all atoms of the substituent connected to rootAtom starting with firstAtom.protected voidrotateAtom(Conformer conformer, int atom, int refAtom, Coordinates unit, double theta)voidsetEnabled(boolean b)abstract java.lang.StringtoString()
-
-
-
Field Detail
-
RULE_TYPE_DISTANCE
public static final int RULE_TYPE_DISTANCE
- See Also:
- Constant Field Values
-
RULE_TYPE_PLANE
public static final int RULE_TYPE_PLANE
- See Also:
- Constant Field Values
-
RULE_TYPE_LINE
public static final int RULE_TYPE_LINE
- See Also:
- Constant Field Values
-
RULE_TYPE_TORSION
public static final int RULE_TYPE_TORSION
- See Also:
- Constant Field Values
-
RULE_TYPE_STEREO
public static final int RULE_TYPE_STEREO
- See Also:
- Constant Field Values
-
RULE_TYPE_BINAP
public static final int RULE_TYPE_BINAP
- See Also:
- Constant Field Values
-
RULE_NAME
public static final java.lang.String[] RULE_NAME
-
mAtom
protected int[] mAtom
-
mIsEnabled
protected boolean mIsEnabled
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean b)
-
apply
public abstract boolean apply(Conformer conformer, double cycleFactor)
-
addStrain
public abstract double addStrain(Conformer conformer, double[] atomStrain)
-
getRuleType
public abstract int getRuleType()
-
toString
public abstract java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getAtomList
protected int[] getAtomList()
-
addAtomList
protected void addAtomList(java.lang.StringBuilder sb)
-
moveGroup
protected void moveGroup(Conformer conformer, int atom, int[] notList, double dx, double dy, double dz)
Move one atom and all non-ring-bond substituents, provided attachment atom is not part of the notList.- Parameters:
conformer-atom-notList- atom list that are not moveddx-dy-dz-
-
moveSubstituent
protected void moveSubstituent(Conformer conformer, int rootAtom, int firstAtom, double dx, double dy, double dz)
Moves all atoms of the substituent connected to rootAtom starting with firstAtom.- Parameters:
conformer-rootAtom-firstAtom-dx-dy-dz-
-
moveAtomWithUnboundedNeighbors
protected void moveAtomWithUnboundedNeighbors(Conformer conformer, int atom, double dx, double dy, double dz)
-
rotateAtom
protected void rotateAtom(Conformer conformer, int atom, int refAtom, Coordinates unit, double theta)
-
-