Package schrodinger :: Package trajectory :: Module analysis :: Class HydrogenBondFinder
[hide private]
[frames] | no frames]

Class HydrogenBondFinder

analysistool.AnalysisTool --+
                            |
                           HydrogenBondFinder

A tool to find hydrogen bonds present between two sets of molecules.

Instance Methods [hide private]
 
__init__(self, atomsel1, atomsel2, tol=0.01, *args, **kwargs)
Initialize frame slicing information.
 
isOrthogonal(self, box, tol)
 
processFrame(self, frame)
Collect data for the provided frame.
 
getFrameResults(self)
For each frame, return a list of (acceptor, donor) integer tuples, each value being a 1-based atom index into the overall simulation structure.
 
getResults(self)
Return results for all values and frames as a numpy array with the first index across analyses.
 
getAllBonds(self)
Return a set of all hydrogen bonds found by the analysis.

Inherited from analysistool.AnalysisTool: doFrameInit, getDataLabels, getLabel, plot, plot2D, postProcess, setSlice, shouldProcessFrame

Method Details [hide private]

__init__(self, atomsel1, atomsel2, tol=0.01, *args, **kwargs)
(Constructor)

 

Initialize frame slicing information.

The behavior of 'start', 'stop', 'step' is the same as the python built-in range function. That is, 'start' is included in the values to be processed, but 'stop' is not. Only the largest value satisfying 'start' and 'step' that is less than 'stop' will be processed.

Parameters:
  • atomsel1 (AtomSelection instance) - The atom selection from which to select hydrogen bond acceptors or donors.
  • atomsel2 (AtomSelection instance) - The atom selection from which to select hydrogen bond acceptors or donors.
Overrides: analysistool.AnalysisTool.__init__

processFrame(self, frame)

 

Collect data for the provided frame.

Overrides: analysistool.AnalysisTool.processFrame
(inherited documentation)

getFrameResults(self)

 

For each frame, return a list of (acceptor, donor) integer tuples, each value being a 1-based atom index into the overall simulation structure.

Note that the returned value here is not a numpy array as each frame may have a different number of hydrogen bonds.

Overrides: analysistool.AnalysisTool.getFrameResults

getResults(self)

 

Return results for all values and frames as a numpy array with the first index across analyses.

So, if r = analysis.getResults(), and the analysis instance calculates three values for each frame, then r[0] will be the first value across all frames.

Overrides: analysistool.AnalysisTool.getResults
(inherited documentation)

getAllBonds(self)

 

Return a set of all hydrogen bonds found by the analysis. Results are in the same form as getFrameResults() - a pair of (acceptor, donor) integers.