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[]
mAtom
protected boolean
mIsEnabled
static java.lang.String[]
RULE_NAME
static int
RULE_TYPE_BINAP
static int
RULE_TYPE_DISTANCE
static int
RULE_TYPE_LINE
static int
RULE_TYPE_PLANE
static int
RULE_TYPE_STEREO
static int
RULE_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 void
addAtomList(java.lang.StringBuilder sb)
abstract double
addStrain(Conformer conformer, double[] atomStrain)
abstract boolean
apply(Conformer conformer, double cycleFactor)
protected int[]
getAtomList()
abstract int
getRuleType()
boolean
isEnabled()
protected void
moveAtomWithUnboundedNeighbors(Conformer conformer, int atom, double dx, double dy, double dz)
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.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.protected void
rotateAtom(Conformer conformer, int atom, int refAtom, Coordinates unit, double theta)
void
setEnabled(boolean b)
abstract java.lang.String
toString()
-
-
-
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:
toString
in 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)
-
-