Package org.openmolecules.chem.conf.gen
Class TorsionSetStrategyRandom
- java.lang.Object
-
- org.openmolecules.chem.conf.gen.TorsionSetStrategy
-
- org.openmolecules.chem.conf.gen.TorsionSetStrategyRandom
-
- Direct Known Subclasses:
TorsionSetStrategyAdaptiveRandom
public class TorsionSetStrategyRandom extends TorsionSetStrategy
-
-
Field Summary
-
Fields inherited from class org.openmolecules.chem.conf.gen.TorsionSetStrategy
MAX_ALLOWED_COLLISION_INTENSITY, mRigidFragment, mRotatableBond
-
-
Constructor Summary
Constructors Constructor Description TorsionSetStrategyRandom(RotatableBond[] rotatableBond, RigidFragment[] fragment, boolean preferLikelyTorsions, long seed)
This simple TorsionSetStrategy produces random sets of torsion indexes in a loop.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TorsionSet
createTorsionSet(TorsionSet previousTorsionSet)
Build a new set of torsion angles by pure or biased random picking.java.util.Random
getRandom()
-
Methods inherited from class org.openmolecules.chem.conf.gen.TorsionSetStrategy
calculateCollisionTolerance, createTorsionSet, eliminationRuleString, getBestCollidingTorsionIndexes, getBondAndFragmentCollisionIntensities, getBondsBetweenFragments, getContribution, getEliminationRuleList, getFailureCount, getNextTorsionSet, getPermutationCount, getTorsionSetCount, isNewTorsionSet, setMaxTotalCount
-
-
-
-
Constructor Detail
-
TorsionSetStrategyRandom
public TorsionSetStrategyRandom(RotatableBond[] rotatableBond, RigidFragment[] fragment, boolean preferLikelyTorsions, long seed)
This simple TorsionSetStrategy produces random sets of torsion indexes in a loop. If it finds a new torsion set within a reasonable number of cycles, the set is returned. If this is not successful or if all permutations of torsion indexes was already delivered, then it stops creating new permutations and returns null.
Torsion indices are chosen either pure randomly or optionally with a bias towards those torsion angles, that are more frequently populated in the CSD and cause less collision strain.- Parameters:
rotatableBond
-preferLikelyTorsions
- if set then more frequent angles are picked with higher probabilityseed
-
-
-
Method Detail
-
getRandom
public java.util.Random getRandom()
-
createTorsionSet
public TorsionSet createTorsionSet(TorsionSet previousTorsionSet)
Build a new set of torsion angles by pure or biased random picking.- Specified by:
createTorsionSet
in classTorsionSetStrategy
- Parameters:
previousTorsionSet
- is not used- Returns:
- a random and new torsion index set.
-
-