selParser

Classes

class selParser.SelParser(dataContext, selT=None)

This class is used to parse a simple selection text, calls the appropriate functions from NAMDPSF and NAMDDCD.

A dataContext is provided to the class, that is simply the Dataset class, in which psf and dcd files are loaded.

Atom indices are stored for each frame in selection attribute.

Examples:

To select hydrogens bound to water oxygens within 3 angstroms of a protein region for a given frame range, use from class Dataset instance d:

d.selection('name H1 H2 and bound to name OH2 and within 3 '
            'of protein and resid 40:80 frame 0:100:2')
process()

Parse the selection string ‘selText’ by identifying keywords.