Package gromacs :: Package analysis :: Package plugins :: Module dist :: Class GdistData
[hide private]
[frames] | no frames]

Class GdistData

source code

object --+
         |
        GdistData

Object that represents the standard output of g_dist -dist CUTOFF.

Initialize from a stream (e.g. a pipe) and the iterate over the instance to get the data line by line. Each line consists of a tuple

(frame, distance)
Instance Methods [hide private]
 
__init__(self, stream)
Initialize with an open stream to the data (eg stdin or file).
source code
 
__iter__(self)
Iterator that filters the input stream and returns (frame, distance) tuples.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  data_pattern = re.compile(r'(?x)t:\s*(?P<FRAME>\d+)\s+(?P<RESI...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, stream)
(Constructor)

source code 
Initialize with an open stream to the data (eg stdin or file).
Overrides: object.__init__

Arguments:

stream
open stream (file or pipe or really any iterator providing the data from g_dist); the stream is not closed automatically when the iterator completes.


Class Variable Details [hide private]

data_pattern

Value:
re.compile(r'(?x)t:\s*(?P<FRAME>\d+)\s+(?P<RESID>\d+)\s+(?P<RESNAME>\w\
+)\s+(?P<ATOMID>\d+)\s+(?P<ATOMNAME>\w+)\s+(?P<DISTANCE>[0-9]+\.?[0-9]\
+)\s+\(nm\)')