|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmeshi.util.Utils
public class Utils
Where we store useful static methods that do not make sense anywhere else.
| Nested Class Summary | |
|---|---|
private static class |
Utils.DefaultExceptionHandler
|
private static class |
Utils.DoNothingExceptionHandler
|
| Field Summary | |
|---|---|
static ExceptionHandler |
defaultExceptionHandler
|
static ExceptionHandler |
doNothing
|
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static boolean |
addAtoms(Protein model,
CommandList commands)
|
static boolean |
addAtoms(Protein model,
CommandList commands,
int maxNumberOfRandomCoordinatesPerResidue)
|
static void |
addHydrogens(Protein protein,
CommandList commands)
|
static ResidueAlignment |
alignProteinsByAlignmentFile(CommandList commands,
Key key,
Chain chain0,
Chain chain1)
|
static void |
assignBackboneCoordinates(AtomList modelAtoms,
AtomList tempAtoms)
|
static void |
AssignDSSP(Protein protein,
CommandList commands,
Key key)
|
static void |
AssignDSSP(Protein protein,
java.lang.String dsspFileName)
|
static void |
assignRandomCaCoordinates(Chain chain)
|
static boolean |
assignRandomCoordinates(Residue residue,
CommandList commands,
int maxMissingAtoms)
|
static void |
assignSecondaryStructure(Chain chain,
CommandList commands,
Key key)
|
static void |
assignSecondaryStructure(Protein protein,
CommandList commands,
Key key)
|
static void |
assignSecondaryStructure(Protein protein,
SequenceAlignment targetSecondaryStructure)
|
static void |
colorByEnergy(AtomList atomList)
|
static AtomList |
duplicateInAnewMolecularSystem(AtomList atomList)
|
static boolean |
equals(java.lang.Object obj1,
java.lang.Object obj2)
Static version of equals. |
static java.util.ArrayList |
filter(java.util.ArrayList list,
Filter filter,
java.util.ArrayList out)
|
static DistanceList |
filter(DistanceList list,
Filter filter,
DistanceList out)
|
static AngleParametersList |
getAngleParameters(CommandList commands)
|
static BondParametersList |
getBondParameters(CommandList commands)
|
static int |
getClashes(Atom atom,
java.util.List<Atom> neighbors,
double clashDistance)
|
static Atom |
getCovalentNeighbor(Atom atom)
|
private static Atom |
getCovalentNeighborUp(Atom atom)
May be used only by getCovalentNeighbor(Atom atom) |
static DistanceMatrix |
getDistanceMatrix(AtomList atomList,
CommandList commands)
A standard method to build distance matrices. |
static java.lang.String[] |
getEnergyTermsNames(TotalEnergy totalEnergy)
|
static double[] |
getEnergyValues(TotalEnergy totalEnergy)
|
static ResidueList |
getFragment(Protein protein,
int start,
int end)
|
static LBFGS |
getLBFGS(TotalEnergy energy,
CommandList commands)
|
static LBFGS |
getLBFGS(TotalEnergy energy,
CommandList commands,
Key key)
|
static java.util.List<Atom> |
getNeighbors(Atom atom,
Protein protein,
double clashDistance)
|
static AtomList |
getNeighbors(ResidueList residueList,
Protein protein,
double clashDistance)
|
static ResidueAlignment |
getOriginalAtomsAlignment(ResidueAlignment alignment,
OriginalAtoms originalAtoms,
int row)
Gets a residue alignment as a parameters and returns a new alignment that includes only residues with original atoms. |
static MeshiWriter |
getOutputFile(CommandList commands)
|
static Protein |
getProtein(CommandList commands,
Key key1,
Key key2,
ResidueCreator creator,
ExceptionHandler exceptionHandler)
Reads a protein structure from the file pointed at by the command list. |
static Protein |
getProtein(CommandList commands,
Key key,
ResidueCreator creator,
ExceptionHandler exceptionHandler)
Creates a Protein object in a new MolecularSystem. |
static Protein |
getProtein(CommandList commands,
java.lang.String fileName,
ResidueCreator creator,
ExceptionHandler exceptionHandler)
|
static java.lang.String |
getProteinNameFromPdbFileName(java.lang.String fullFileName)
Reads a protein structure from the file pointed at by the command list. |
static Protein |
getReferenceProtein(CommandList commands)
|
static ResidueSequence |
getResidueSequence(CommandList commands,
Key key)
|
static int[] |
getSeqOfProt(Protein prot,
int fromRes,
int toRes)
|
static StringList |
getStructureNames(CommandList commands)
|
static void |
hideAllBut(AtomList atomList)
|
static CommandList |
init(java.lang.String[] args,
int numberOfParameters,
int seed,
java.lang.String errorMessage)
|
static CommandList |
init(java.lang.String[] args,
int numberOfParameters,
java.lang.String errorMessage)
|
static CommandList |
init(java.lang.String[] args,
java.lang.String name)
A standard method to create the commands list. |
static void |
moveHydrogensCloseToHeavy(AtomList atoms,
double radius)
|
static MeshiWriter |
newPdbWriter(CommandList commands,
Key pathKey,
Key nameKey,
int runNumber)
Opens a file for writing (warped by MeshiWriter object) with a name and location specified by the commands and a . |
static int |
numberOfAtomsWithCoordinates(Protein protein)
|
static int |
numberOfNonDummyResidues(Protein protein)
|
static TotalEnergy |
oldRelax(AtomList atoms,
Protein protein,
EnergyCreator[] energyCreators,
CommandList commands)
|
static TotalEnergy |
oldRelax(AtomList atoms,
Protein protein,
EnergyCreator[] energyCreators,
CommandList commands,
Key key)
|
static void |
print(java.util.ArrayList list,
int rawLength,
java.lang.String format)
Print the list elements in raws. |
static void |
print(java.lang.Iterable list)
|
static void |
printCaspFormat(ModelData modelData,
CommandList commands,
int modelNum)
|
static double |
radius(MolecularSystem molecularSystem)
|
static TotalEnergy |
relax(AtomList atoms,
Protein protein,
EnergyCreator[] energyCreators,
CommandList commands)
|
static TotalEnergy |
relax(AtomList atoms,
Protein protein,
EnergyCreator[] energyCreators,
CommandList commands,
Key key)
|
static void |
RmsGdtEnergy(MeshiWriter output,
ResidueAlignment modelRefeenceAlignment,
TotalEnergy totalEnergy,
java.lang.String tag,
int refLength)
|
static void |
RmsGdtEnergy(java.lang.Object output,
Protein model,
Protein reference,
TotalEnergy totalEnergy,
java.lang.String tag)
|
static void |
RmsGdtEnergy(java.lang.Object output,
ResidueSequence model,
ResidueSequence reference,
TotalEnergy totalEnergy,
java.lang.String tag)
|
static void |
RmsGdtEnergy(StringList output,
ResidueAlignment modelRefeenceAlignment,
TotalEnergy totalEnergy,
java.lang.String tag,
int refLength)
|
static void |
testMolecularSystemIntegrity(MolecularSystem ms,
java.lang.String comment)
|
static void |
testNonBondedList(DistanceList nonBondedList)
|
static double |
toDouble(java.lang.String s)
Converts a string to a double. |
static int |
toInt(java.lang.String s)
Converts a string to an int. |
static boolean |
weirdAtom(Atom atom)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ExceptionHandler defaultExceptionHandler
public static final ExceptionHandler doNothing
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static CommandList init(java.lang.String[] args,
java.lang.String name)
public static CommandList init(java.lang.String[] args,
int numberOfParameters,
java.lang.String errorMessage)
public static CommandList init(java.lang.String[] args,
int numberOfParameters,
int seed,
java.lang.String errorMessage)
public static ResidueAlignment getOriginalAtomsAlignment(ResidueAlignment alignment,
OriginalAtoms originalAtoms,
int row)
public static void assignSecondaryStructure(Protein protein,
CommandList commands,
Key key)
public static void assignSecondaryStructure(Chain chain,
CommandList commands,
Key key)
public static void assignSecondaryStructure(Protein protein,
SequenceAlignment targetSecondaryStructure)
public static ResidueAlignment alignProteinsByAlignmentFile(CommandList commands,
Key key,
Chain chain0,
Chain chain1)
public static DistanceMatrix getDistanceMatrix(AtomList atomList,
CommandList commands)
public static double[] getEnergyValues(TotalEnergy totalEnergy)
public static java.lang.String[] getEnergyTermsNames(TotalEnergy totalEnergy)
public static TotalEnergy relax(AtomList atoms,
Protein protein,
EnergyCreator[] energyCreators,
CommandList commands)
public static TotalEnergy oldRelax(AtomList atoms,
Protein protein,
EnergyCreator[] energyCreators,
CommandList commands)
public static TotalEnergy oldRelax(AtomList atoms,
Protein protein,
EnergyCreator[] energyCreators,
CommandList commands,
Key key)
public static TotalEnergy relax(AtomList atoms,
Protein protein,
EnergyCreator[] energyCreators,
CommandList commands,
Key key)
public static StringList getStructureNames(CommandList commands)
public static MeshiWriter getOutputFile(CommandList commands)
public static MeshiWriter newPdbWriter(CommandList commands,
Key pathKey,
Key nameKey,
int runNumber)
public static void RmsGdtEnergy(java.lang.Object output,
ResidueSequence model,
ResidueSequence reference,
TotalEnergy totalEnergy,
java.lang.String tag)
public static void RmsGdtEnergy(java.lang.Object output,
Protein model,
Protein reference,
TotalEnergy totalEnergy,
java.lang.String tag)
public static void RmsGdtEnergy(MeshiWriter output,
ResidueAlignment modelRefeenceAlignment,
TotalEnergy totalEnergy,
java.lang.String tag,
int refLength)
public static void RmsGdtEnergy(StringList output,
ResidueAlignment modelRefeenceAlignment,
TotalEnergy totalEnergy,
java.lang.String tag,
int refLength)
public static boolean equals(java.lang.Object obj1,
java.lang.Object obj2)
public static int toInt(java.lang.String s)
public static double toDouble(java.lang.String s)
public static int[] getSeqOfProt(Protein prot,
int fromRes,
int toRes)
public static double radius(MolecularSystem molecularSystem)
public static void testMolecularSystemIntegrity(MolecularSystem ms,
java.lang.String comment)
public static void hideAllBut(AtomList atomList)
public static LBFGS getLBFGS(TotalEnergy energy,
CommandList commands)
public static LBFGS getLBFGS(TotalEnergy energy,
CommandList commands,
Key key)
public static boolean addAtoms(Protein model,
CommandList commands)
public static boolean addAtoms(Protein model,
CommandList commands,
int maxNumberOfRandomCoordinatesPerResidue)
public static void printCaspFormat(ModelData modelData,
CommandList commands,
int modelNum)
public static int numberOfNonDummyResidues(Protein protein)
public static int numberOfAtomsWithCoordinates(Protein protein)
public static java.lang.String getProteinNameFromPdbFileName(java.lang.String fullFileName)
public static ResidueList getFragment(Protein protein,
int start,
int end)
public static void addHydrogens(Protein protein,
CommandList commands)
public static Protein getProtein(CommandList commands,
Key key,
ResidueCreator creator,
ExceptionHandler exceptionHandler)
public static Protein getProtein(CommandList commands,
java.lang.String fileName,
ResidueCreator creator,
ExceptionHandler exceptionHandler)
public static Protein getProtein(CommandList commands,
Key key1,
Key key2,
ResidueCreator creator,
ExceptionHandler exceptionHandler)
public static Protein getReferenceProtein(CommandList commands)
public static void assignRandomCaCoordinates(Chain chain)
public static boolean assignRandomCoordinates(Residue residue,
CommandList commands,
int maxMissingAtoms)
public static Atom getCovalentNeighbor(Atom atom)
private static Atom getCovalentNeighborUp(Atom atom)
public static void colorByEnergy(AtomList atomList)
public static void assignBackboneCoordinates(AtomList modelAtoms,
AtomList tempAtoms)
public static void AssignDSSP(Protein protein,
CommandList commands,
Key key)
public static void AssignDSSP(Protein protein,
java.lang.String dsspFileName)
public static AtomList getNeighbors(ResidueList residueList,
Protein protein,
double clashDistance)
public static boolean weirdAtom(Atom atom)
public static java.util.List<Atom> getNeighbors(Atom atom,
Protein protein,
double clashDistance)
public static int getClashes(Atom atom,
java.util.List<Atom> neighbors,
double clashDistance)
public static ResidueSequence getResidueSequence(CommandList commands,
Key key)
public static void print(java.lang.Iterable list)
public static void print(java.util.ArrayList list,
int rawLength,
java.lang.String format)
public static java.util.ArrayList filter(java.util.ArrayList list,
Filter filter,
java.util.ArrayList out)
public static DistanceList filter(DistanceList list,
Filter filter,
DistanceList out)
public static void testNonBondedList(DistanceList nonBondedList)
public static AtomList duplicateInAnewMolecularSystem(AtomList atomList)
public static void moveHydrogensCloseToHeavy(AtomList atoms,
double radius)
public static BondParametersList getBondParameters(CommandList commands)
public static AngleParametersList getAngleParameters(CommandList commands)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||