Package ffx.algorithms.optimize.manybody
Class EliminatedRotamers
java.lang.Object
ffx.algorithms.optimize.manybody.EliminatedRotamers
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean[][][][]Eliminated rotamer pairs.boolean[][]Eliminated rotamers.boolean[][][][]Pruned rotamer pairs.boolean[][]Pruned rotamers. -
Constructor Summary
ConstructorsConstructorDescriptionEliminatedRotamers(RotamerOptimization rO, DistanceMatrix dM, List<Residue> allResiduesList, int maxRotCheckDepth, double clashThreshold, double pairClashThreshold, double multiResClashThreshold, double nucleicPruningFactor, double nucleicPairsPruningFactor, double multiResPairClashAddn, boolean pruneClashes, boolean prunePairClashes, boolean print, Residue[] residues) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck(int i, int ri) Check for eliminated rotamer; true if eliminated.booleancheck(int i, int ri, int j, int rj) Check for eliminated rotamer pair; true if eliminated.booleancheckPrunedPairs(int i, int ri, int j, int rj) Check for pruned rotamer pair; true if eliminated.booleancheckPrunedSingles(int i, int ri) Check for pruned rotamer; true if eliminated.booleancheckToJ(int i, int ri, int j, int rj) Checks to see if any eliminations with j,rj have occurred; assumes i,ri self has already been checked.booleancheckToK(int i, int ri, int j, int rj, int k, int rk) Checks to see if any eliminations with k,rk have occurred; assumes i,ri,j,rj 2-Body has already been checked.booleancheckToL(int i, int ri, int j, int rj, int k, int rk, int l, int rl) Checks to see if any eliminations with l,rl have occurred; assumes i,ri,j,rj,k,rk 3-Body has already been checked.booleaneliminateRotamer(Residue[] residues, int i, int ri, boolean verbose) Safe method to eliminate a rotamer: will not eliminate if there are no alternate rotamers for residue i, or if i-ri is already eliminated.booleaneliminateRotamerPair(Residue[] residues, int i, int ri, int j, int rj, boolean verbose) inteliminateRotamerPairs(Residue[] residues, int i, int ri, boolean verbose) booleanpairsToSingleElimination(Residue[] residues, int i, int j) Method to check if pairs elimination for some residue pair has enabled a singles rotamer elimination by eliminating all ri-rj for some ri or some rj.voidprePrunePairs(Residue[] residues) Pre-prunes any pairs that have a pair-energy of Double.NaN before pruning and eliminations happen.voidprePruneSelves(Residue[] residues) Pre-prunes any selves that have a self-energy of Double.NaN before pruning and eliminations happen.voidprunePairClashes(Residue[] residues) Prunes rotamer ri of residue i if all ri-j pair energies are worse than the best i-j pair by some threshold value; additionally prunes ri-rj pairs if they exceed the best i-j pair by a greater threshold value; additionally performs this in reverse (searches over j-i).voidpruneSingleClashes(Residue[] residues) Uses calculated energies to prune rotamers based on a threshold distance from that residue's minimum energy rotamer (by default 20 kcal/mol).voidtoString()booleanvalidateDEE(Residue[] residues)
-
Field Details
-
eliminatedSingles
public boolean[][] eliminatedSinglesEliminated rotamers. [residue][rotamer] -
eliminatedPairs
public boolean[][][][] eliminatedPairsEliminated rotamer pairs. [residue1][rotamer1][residue2][rotamer2] -
onlyPrunedSingles
public boolean[][] onlyPrunedSinglesPruned rotamers. Only for JUnit testing purposes. -
onlyPrunedPairs
public boolean[][][][] onlyPrunedPairsPruned rotamer pairs. Only for JUnit testing purposes.
-
-
Constructor Details
-
EliminatedRotamers
public EliminatedRotamers(RotamerOptimization rO, DistanceMatrix dM, List<Residue> allResiduesList, int maxRotCheckDepth, double clashThreshold, double pairClashThreshold, double multiResClashThreshold, double nucleicPruningFactor, double nucleicPairsPruningFactor, double multiResPairClashAddn, boolean pruneClashes, boolean prunePairClashes, boolean print, Residue[] residues)
-
-
Method Details
-
check
public boolean check(int i, int ri) Check for eliminated rotamer; true if eliminated.- Parameters:
i- Residue i.ri- Rotamer ri.- Returns:
- True if rotamer eliminated.
-
check
public boolean check(int i, int ri, int j, int rj) Check for eliminated rotamer pair; true if eliminated.- Parameters:
i- Residue i.ri- Rotamer ri.j- Residue j.rj- Rotamer rj.- Returns:
- True if eliminated pair.
-
checkPrunedPairs
public boolean checkPrunedPairs(int i, int ri, int j, int rj) Check for pruned rotamer pair; true if eliminated. Only used during testing.- Parameters:
i- Residue i.ri- Rotamer ri.j- Residue j.rj- Rotamer rj.- Returns:
- a boolean.
-
checkPrunedSingles
public boolean checkPrunedSingles(int i, int ri) Check for pruned rotamer; true if eliminated. Only used during testing.- Parameters:
i- The residue.ri- The rotamer.- Returns:
- a boolean.
-
checkToJ
public boolean checkToJ(int i, int ri, int j, int rj) Checks to see if any eliminations with j,rj have occurred; assumes i,ri self has already been checked. Checks j,rj self and i,ri,j,rj 2-Body. The intent is to be part of a loop over i,ri,j,rj, and check for eliminations at the j,rj point.- Parameters:
i- Residue iri- Rotamer rij- Residue jrj- Rotamer rj- Returns:
- j eliminated with i
-
checkToK
public boolean checkToK(int i, int ri, int j, int rj, int k, int rk) Checks to see if any eliminations with k,rk have occurred; assumes i,ri,j,rj 2-Body has already been checked. Checks the k,rk self, all pairs with k,rk, and the i,ri,j,rj,k,rk 3-Body. The intent is to be part of a loop over i,ri,j,rj,k,rk, and check for eliminations at the k,rk point.- Parameters:
i- Residue iri- Rotamer rij- Residue jrj- Rotamer rjk- Residue krk- Rotamer rk- Returns:
- k eliminated with i,j
-
checkToL
public boolean checkToL(int i, int ri, int j, int rj, int k, int rk, int l, int rl) Checks to see if any eliminations with l,rl have occurred; assumes i,ri,j,rj,k,rk 3-Body has already been checked. Checks the l,rl self, all pairs with l,rl, all triples with l,rl, and the 4-Body. The intent is to be part of a loop over i,ri,j,rj,k,rk,l,rl, and check for eliminations at the l,rl point.- Parameters:
i- Residue iri- Rotamer rij- Residue jrj- Rotamer rjk- Residue krk- Rotamer rkl- Residue lrl- Rotamer rl- Returns:
- l eliminated with i,j,k
-
eliminateRotamer
Safe method to eliminate a rotamer: will not eliminate if there are no alternate rotamers for residue i, or if i-ri is already eliminated.- Parameters:
residues- Residues under consideration.i- A residue index based on the current residue list.ri- A rotamer to attempt elimination of.verbose- Request verbose logging.- Returns:
- If the rotamer was eliminated.
-
eliminateRotamerPair
public boolean eliminateRotamerPair(Residue[] residues, int i, int ri, int j, int rj, boolean verbose) -
eliminateRotamerPairs
-
pairsToSingleElimination
Method to check if pairs elimination for some residue pair has enabled a singles rotamer elimination by eliminating all ri-rj for some ri or some rj.- Parameters:
residues- Residues under consideration.i- A residue index.j- A residue index j!=i- Returns:
- If any singletons were eliminated.
-
prePrunePairs
Pre-prunes any pairs that have a pair-energy of Double.NaN before pruning and eliminations happen.- Parameters:
residues- Array of all residues.
-
prePruneSelves
Pre-prunes any selves that have a self-energy of Double.NaN before pruning and eliminations happen.- Parameters:
residues- Array of all residues.
-
prunePairClashes
Prunes rotamer ri of residue i if all ri-j pair energies are worse than the best i-j pair by some threshold value; additionally prunes ri-rj pairs if they exceed the best i-j pair by a greater threshold value; additionally performs this in reverse (searches over j-i).- Parameters:
residues- Residues whose rotamers are to be pruned.
-
pruneSingleClashes
Uses calculated energies to prune rotamers based on a threshold distance from that residue's minimum energy rotamer (by default 20 kcal/mol). The threshold can be modulated by presence of nucleic acids or MultiResidues, which require more generous pruning criteria.- Parameters:
residues- Residues to prune rotamers over.
-
setEnergyExpansion
-
toString
-
validateDEE
-