$darkmode
DENOPTIM
|
Toolbox of utilities for Tinker style molecular representation. More...
Static Public Member Functions | |
static TinkerMolecule | readTinkerIC (String filename) throws DENOPTIMException |
Reads a Tinker INT file. More... | |
static ArrayList< double[]> | readTinkerXYZ (String filename) throws DENOPTIMException |
Read the tinker XYZ coordinate representation. More... | |
static void | writeIC (String filename, TinkerMolecule tmol) throws DENOPTIMException |
Write Tinker INT file. More... | |
static ArrayList< Double > | readPSSROTOutput (String filename) throws DENOPTIMException |
Read the PSSROT output file. More... | |
static void | readPSSROTParams (String filename, ArrayList< String > initPars, ArrayList< String > restPars) throws DENOPTIMException |
Read the parameter settings to be used by PSSROT. More... | |
static HashMap< String, Integer > | readTinkerAtomTypes (String filename) throws DENOPTIMException |
Read the Tinker atom mapping from Tinker Force Field. More... | |
static TinkerMolecule | getICFromIAC (IAtomContainer mol, HashMap< String, Integer > tMap) throws DENOPTIMException |
Convert IAtomContainer to TinkerMolecule . More... | |
static void | setTinkerTypes (TinkerMolecule tmol, HashMap< String, Integer > tMap) throws DENOPTIMException |
Conversion to tinker IC may not always have the necessary atom types. More... | |
static void | ensureOutputExistsOrRelayError (String outputPathName, String logPathName, String taskName) throws TinkerException |
Check for the existence of an output file for a Tinker job and, if the output file is not found, this method throws an exception that contains the error message from Tinker job log. More... | |
static String | getNameLastCycleFile (String workDir, String fname, String tinkerLog, String pattern) throws DENOPTIMException |
Identifies how many iteration Tinker has done by looking into the log file, searching for a given pattern. More... | |
Static Private Member Functions | |
static int | getFirstRefAtomId (int i1, IAtomContainer mol) |
static int | getSecondRefAtomId (int i1, int i2, IAtomContainer mol) |
static ObjectPair | getThirdRefAtomId (int i1, int i2, int i3, IAtomContainer mol, TinkerMolecule tm) throws DENOPTIMException |
static int | countPredefinedNeighbours (int i, IAtom a, IAtomContainer mol) |
Static Private Attributes | |
static final String | NL = System.getProperty("line.separator") |
static boolean | debug = false |
Toolbox of utilities for Tinker style molecular representation.
Definition at line 54 of file TinkerUtils.java.
|
staticprivate |
Definition at line 990 of file TinkerUtils.java.
Referenced by denoptim.integration.tinker.TinkerUtils.getThirdRefAtomId().
|
static |
Check for the existence of an output file for a Tinker job and, if the output file is not found, this method throws an exception that contains the error message from Tinker job log.
outputPathName | pathname of the Tinker output file that we expect to exist. |
logPathName | pathname to the log of the Tinker job that was supposed to generate the output. |
taskName | a string identifying the task that Tinker was supposed to perform. |
TinkerException | if the output file is not found. This exception will contain the error from Tinker's log. |
Definition at line 1063 of file TinkerUtils.java.
References denoptim.integration.tinker.TinkerUtils.NL.
Referenced by denoptim.integration.tinker.ConformationalSearchPSSROT.performPSSROT().
|
staticprivate |
Definition at line 868 of file TinkerUtils.java.
Referenced by denoptim.integration.tinker.TinkerUtils.getICFromIAC().
|
static |
Convert IAtomContainer
to TinkerMolecule
.
Supports only containers where all atoms are reachable following the connectivity and starting from any other atom in the container.
mol | the CDK molecule to convert |
tMap | the atom type map |
Definition at line 730 of file TinkerUtils.java.
References denoptim.integration.tinker.TinkerMolecule.addAtom(), denoptim.integration.tinker.TinkerMolecule.addBond(), denoptim.utils.MathUtils.angle(), denoptim.constants.DENOPTIMConstants.ATMPROPVERTEXID, denoptim.integration.tinker.TinkerUtils.debug, denoptim.utils.ObjectPair.getFirst(), denoptim.integration.tinker.TinkerUtils.getFirstRefAtomId(), denoptim.utils.ObjectPair.getSecond(), denoptim.integration.tinker.TinkerUtils.getSecondRefAtomId(), denoptim.utils.MoleculeUtils.getSymbolOrLabel(), denoptim.integration.tinker.TinkerUtils.getThirdRefAtomId(), denoptim.integration.tinker.TinkerMolecule.printIC(), denoptim.integration.tinker.TinkerUtils.setTinkerTypes(), denoptim.integration.tinker.TinkerAtom.setVertexId(), denoptim.utils.MathUtils.torsion(), and denoptim.integration.tinker.TinkerAtom.toString().
Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree().
|
static |
Identifies how many iteration Tinker has done by looking into the log file, searching for a given pattern.
The resulting number of iterations is translated in the pathname of the last iteration file. The iteration files have names like
filename.000
, filename.001
, filename.002
. So, if Tinker took 56 iteration, this method will return filename.055
.
workDir | the directory expected to contain the iteration files. |
fname | the basename of the iteration file. |
tinkerLog | the log file where we count the iterations by searching the patters. |
pattern | the pattern to search in the log file |
DENOPTIMException |
Definition at line 1121 of file TinkerUtils.java.
References denoptim.molecularmodeling.MMBuilderUtils.countLinesWKeywordInFile(), and denoptim.utils.GeneralUtils.getPaddedString().
Referenced by denoptim.integration.tinker.ConformationalSearchPSSROT.performPSSROT().
|
staticprivate |
Definition at line 886 of file TinkerUtils.java.
Referenced by denoptim.integration.tinker.TinkerUtils.getICFromIAC().
|
staticprivate |
Definition at line 904 of file TinkerUtils.java.
References denoptim.utils.MathUtils.angle(), denoptim.integration.tinker.TinkerUtils.countPredefinedNeighbours(), denoptim.integration.tinker.TinkerUtils.debug, and denoptim.utils.MoleculeUtils.getSymbolOrLabel().
Referenced by denoptim.integration.tinker.TinkerUtils.getICFromIAC().
|
static |
Read the PSSROT output file.
filename |
DENOPTIMException |
Definition at line 505 of file TinkerUtils.java.
|
static |
Read the parameter settings to be used by PSSROT.
filename |
DENOPTIMException |
Definition at line 564 of file TinkerUtils.java.
Referenced by denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.processParameters().
|
static |
Read the Tinker atom mapping from Tinker Force Field.
filename |
DENOPTIMException |
Definition at line 637 of file TinkerUtils.java.
References denoptim.integration.tinker.TinkerUtils.NL.
Referenced by denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.processParameters().
|
static |
Reads a Tinker INT file.
Example of Tinker INT file (i.e., internal coordinates)
8 Ethane
1 C 1
2 C 1 1 1.60000
3 H 5 1 1.10000 2 109.4700
4 H 5 1 1.10000 2 109.4700 3 109.4700 1
5 H 5 1 1.10000 2 109.4700 3 109.4700 -1
6 H 5 2 1.10000 1 109.4700 3 10.0000 0
7 H 5 2 1.10000 1 109.4700 6 109.4700 1
8 H 5 2 1.10000 1 109.4700 6 109.4700 -1
The first line, says that there are eight atoms in the system, and that the name of the molecule is Ethane Second line set the origin of the system, i.e., from which atom start to build the molecule: first atom is atom 1, which is a carbon atom, C, and its atom type for the force field is 1 Third line says that the second atom in the molecule is a carbon atom, C, having atom type 1, bonded to atom 1 placed at a distance of 1.6 Angstroms from the atom 1 Fourth line says that the third atom in the structure is an hydrogen atoms, H, having atom type 5, bonded to atom 1, placed at a distance of 1.1 Angstroms from atom 1 and forming an angle of 109.47 degrees with atom 2 Fifth line says that the fourth atom in the structure is an hydrogen atoms, H, having atom type 5, bonded to atom 1, placed at a distance of 1.1 Angstroms from atom 1, and forming an angle of 109.47 degrees with atom 2 Also, the dihedral angles between the planes defined by atoms 1 2 3 and 2 3 4 is 109.47 degrees The last column indicates the chirality flag The structure of this line is then repeated for all the remain atoms. Atom 1 has no internal coordinates at all. The coordinates of atom 1 are, by definition, Cartesian. Normally, the coordinates of atom 1 are (0,0,0), but can be set to any value desired. Atom 2 must be connected to atom 1 by an interatomic distance only. If atom 1 is not at the origin, then the care must be taken in defining atom 2: if internal coordinates are used, then the connectivity must be given. If the connectivity is not specified, then the coordinate of atom 2 is, by definition, Cartesian. Atom 3 can be connected to atom 1 or 2, and must make an angle with atom 2 or 1 (thus 3-2-1 or 3-1-2); no dihedral is possible for atom 3. For any one atom (i) this consists of an interatomic distance in Angstroms from an already-defined atom (j), an interatomic angle in degrees between atoms i and j and an already defined k, (k and j must be different atoms), and finally a torsional angle in degrees between atoms i, j, k, and an already defined atom l (l cannot be the same as k or j).
filename |
Definition at line 110 of file TinkerUtils.java.
References denoptim.integration.tinker.TinkerMolecule.setAtoms(), denoptim.integration.tinker.TinkerMolecule.setBondPairs(), and denoptim.integration.tinker.TinkerMolecule.setName().
Referenced by denoptim.integration.tinker.ConformationalSearchPSSROT.performPSSROT().
|
static |
Read the tinker XYZ coordinate representation.
filename |
DENOPTIMException |
Definition at line 296 of file TinkerUtils.java.
|
static |
Conversion to tinker IC may not always have the necessary atom types.
In order to fix this, we add user defined atom types.
tmol | The tinker IC representation |
DENOPTIMException |
Definition at line 1011 of file TinkerUtils.java.
References denoptim.integration.tinker.TinkerUtils.debug, denoptim.integration.tinker.TinkerAtom.getAtomString(), and denoptim.integration.tinker.TinkerAtom.setAtomType().
Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.build3DTree(), and denoptim.integration.tinker.TinkerUtils.getICFromIAC().
|
static |
Write Tinker INT file.
filename | |
tmol |
DENOPTIMException |
Definition at line 380 of file TinkerUtils.java.
References denoptim.integration.tinker.TinkerAtom.getAtomNeighbours(), denoptim.integration.tinker.TinkerAtom.getAtomString(), denoptim.integration.tinker.TinkerAtom.getAtomType(), denoptim.integration.tinker.TinkerAtom.getDistAngle(), denoptim.integration.tinker.TinkerAtom.getXYZIndex(), and denoptim.integration.tinker.TinkerUtils.NL.
Referenced by denoptim.integration.tinker.ConformationalSearchPSSROT.performPSSROT().
|
staticprivate |
Definition at line 57 of file TinkerUtils.java.
Referenced by denoptim.integration.tinker.TinkerUtils.getICFromIAC(), denoptim.integration.tinker.TinkerUtils.getThirdRefAtomId(), and denoptim.integration.tinker.TinkerUtils.setTinkerTypes().
|
staticprivate |
Definition at line 56 of file TinkerUtils.java.
Referenced by denoptim.integration.tinker.TinkerUtils.ensureOutputExistsOrRelayError(), denoptim.integration.tinker.TinkerUtils.readTinkerAtomTypes(), and denoptim.integration.tinker.TinkerUtils.writeIC().