psfParser¶
Classes¶
-
class
psfParser.NAMDPSF(psfFile=None)¶ This class is used for .psf file reading.
It contains also selection methods that are used throughout the package. These selection methods can be called directly from here, but using the string selection is usually much easier.
-
getAtomsMasses(selection)¶ Return the column corresponding to atoms masses as an 1D array of float.
Parameters: selection – a selection of atoms, either a string or a list
-
getBoundAtoms(selection)¶ Returns the bound atoms for each atom in the given selection.
-
getHBAcceptors(keepList)¶ Identifies all possible hydrogen bond acceptors in the given index list, and returns only those that correspond to atoms not bound to an hydrogen.
-
getHBDonors(keepList)¶ Identifies all possible hydrogen bond donors in the given list, and returns only those that correspond to atoms bound to an hydrogen.
-
getSameResidueAs(selection)¶ Given the provided selection, selects all others atoms that are present in the same residues and returns an updated selection.
-
getSelection(selText=None, segName=None, resID=None, resName=None, atom=None, index=None, invert=False)¶ This method returns an list of index corresponding to the ones that have been selected using the ‘selText’ argument and the indices list.
Parameters: - selText –
keywords defining specific selection
- Possibilites are:
- all
- protein
- backbone
- protH or proteinH
- protNonExchH (non exchangable hydrogens, useful for neutron scattering)
- water
- waterH
- hydrogen
- hbdonors
- hbacceptors
- hbhydrogens (hydrogens bound to
- hydrogen bond donors)
- segName – segment id, or list of segment id
- resNbr – any residue number, or list of residue number
- resID – any residue index, or list of residue indices
- resName – any residue name, or list of residue names
- atom – any atom name, or list of atom names
- index – should be a list, which can be generated with range in case of a range.
- invert – if set to True, is equivalent to write
'not resid 40:80'
Returns: Each of individual arguments are treated separatly, then they are compared and only atom indices that appear in all lists are kept and returned as a np.ndarray.
- selText –
-