$darkmode
DENOPTIM
denoptim.integration.tinker.TinkerUtils Class Reference

Toolbox of utilities for Tinker style molecular representation. More...

Static Public Member Functions

static ZMatrix readTinkerINT (String filename) throws DENOPTIMException
 Reads a Tinker INT file. More...
 
static List< double[]> readTinkerXYZ (String filename) throws DENOPTIMException
 Read the tinker XYZ coordinate representation. More...
 
static void writeTinkerINT (String filename, ZMatrix zmat) throws DENOPTIMException
 Write Tinker INT file. More...
 
static List< Double > readPSSROTOutput (String filename) throws DENOPTIMException
 Read the PSSROT output file. More...
 
static void readPSSROTParams (String filename, List< String > initPars, List< 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 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 Attributes

static final String NL = System.getProperty("line.separator")
 
static boolean debug = false
 

Detailed Description

Toolbox of utilities for Tinker style molecular representation.

Author
Vishwesh Venkatraman
Marco Foscato

Definition at line 46 of file TinkerUtils.java.

Member Function Documentation

◆ ensureOutputExistsOrRelayError()

static void denoptim.integration.tinker.TinkerUtils.ensureOutputExistsOrRelayError ( String  outputPathName,
String  logPathName,
String  taskName 
) throws TinkerException
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.

Parameters
outputPathNamepathname of the Tinker output file that we expect to exist.
logPathNamepathname to the log of the Tinker job that was supposed to generate the output.
taskNamea string identifying the task that Tinker was supposed to perform.
Exceptions
TinkerExceptionif the output file is not found. This exception will contain the error from Tinker's log.

Definition at line 712 of file TinkerUtils.java.

References denoptim.integration.tinker.TinkerUtils.NL.

Referenced by denoptim.integration.tinker.ConformationalSearchPSSROT.performPSSROT().

Here is the caller graph for this function:

◆ getNameLastCycleFile()

static String denoptim.integration.tinker.TinkerUtils.getNameLastCycleFile ( String  workDir,
String  fname,
String  tinkerLog,
String  pattern 
) throws DENOPTIMException
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.

Parameters
workDirthe directory expected to contain the iteration files.
fnamethe basename of the iteration file.
tinkerLogthe log file where we count the iterations by searching the patters.
patternthe pattern to search in the log file
Returns
the pathname of the last cycle-file.
Exceptions
DENOPTIMException

Definition at line 770 of file TinkerUtils.java.

References denoptim.molecularmodeling.MMBuilderUtils.countLinesWKeywordInFile(), and denoptim.utils.GeneralUtils.getPaddedString().

Referenced by denoptim.integration.tinker.ConformationalSearchPSSROT.performPSSROT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readPSSROTOutput()

static List< Double > denoptim.integration.tinker.TinkerUtils.readPSSROTOutput ( String  filename) throws DENOPTIMException
static

Read the PSSROT output file.

Parameters
filename
Returns
the list of energies
Exceptions
DENOPTIMException

Definition at line 482 of file TinkerUtils.java.

◆ readPSSROTParams()

static void denoptim.integration.tinker.TinkerUtils.readPSSROTParams ( String  filename,
List< String >  initPars,
List< String >  restPars 
) throws DENOPTIMException
static

Read the parameter settings to be used by PSSROT.

Parameters
filename
Returns
list of data
Exceptions
DENOPTIMException

Definition at line 541 of file TinkerUtils.java.

Referenced by denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.processParameters().

Here is the caller graph for this function:

◆ readTinkerAtomTypes()

static HashMap< String, Integer > denoptim.integration.tinker.TinkerUtils.readTinkerAtomTypes ( String  filename) throws DENOPTIMException
static

Read the Tinker atom mapping from Tinker Force Field.

Parameters
filename
Returns
map of atom symbol and Tinker type
Exceptions
DENOPTIMException

Definition at line 614 of file TinkerUtils.java.

References denoptim.integration.tinker.TinkerUtils.NL.

Referenced by denoptim.programs.moldecularmodelbuilder.MMBuilderParameters.processParameters().

Here is the caller graph for this function:

◆ readTinkerINT()

static ZMatrix denoptim.integration.tinker.TinkerUtils.readTinkerINT ( String  filename) throws DENOPTIMException
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).

Parameters
filename

Definition at line 102 of file TinkerUtils.java.

References denoptim.molecularmodeling.zmatrix.ZMatrix.addAtom(), denoptim.molecularmodeling.zmatrix.ZMatrix.addBond(), denoptim.molecularmodeling.zmatrix.ZMatrix.delBond(), denoptim.molecularmodeling.zmatrix.ZMatrix.getAtom(), and denoptim.molecularmodeling.zmatrix.ZMatrix.setId().

Referenced by denoptim.integration.tinker.ConformationalSearchPSSROT.performPSSROT(), and denoptim.integration.tinker.TinkerUtilsTest.testINTRoundTrip().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readTinkerXYZ()

static List< double[]> denoptim.integration.tinker.TinkerUtils.readTinkerXYZ ( String  filename) throws DENOPTIMException
static

Read the tinker XYZ coordinate representation.

Parameters
filename
Returns
the 3d coordinates
Exceptions
DENOPTIMException

Definition at line 264 of file TinkerUtils.java.

◆ writeTinkerINT()

static void denoptim.integration.tinker.TinkerUtils.writeTinkerINT ( String  filename,
ZMatrix  zmat 
) throws DENOPTIMException
static

Write Tinker INT file.

Parameters
filename
zmat
Exceptions
DENOPTIMException

Definition at line 348 of file TinkerUtils.java.

References denoptim.molecularmodeling.zmatrix.ZMatrixAtom.getId(), denoptim.molecularmodeling.zmatrix.ZMatrixAtom.getSymbol(), denoptim.molecularmodeling.zmatrix.ZMatrixAtom.getType(), and denoptim.integration.tinker.TinkerUtils.NL.

Referenced by denoptim.integration.tinker.ConformationalSearchPSSROT.performPSSROT(), denoptim.integration.tinker.TinkerUtilsTest.testINTRoundTrip(), and denoptim.integration.tinker.TinkerUtilsTest.testWriteTinkerINT().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ debug

boolean denoptim.integration.tinker.TinkerUtils.debug = false
staticprivate

Definition at line 49 of file TinkerUtils.java.

◆ NL

final String denoptim.integration.tinker.TinkerUtils.NL = System.getProperty("line.separator")
staticprivate

The documentation for this class was generated from the following file: