psfGen
index
psfGen.py


 
generate PSF information from sequence or coordinates.
 
Particularly useful are the pdbToPSF and seqToPSF routines.

 
Functions
       
addDisulfideBond(sel1, sel2)

 
add a disulfide bond between residues in the two atom selections
 
Should be called after PSF information is generated.
autoProcessPdbSSBonds(pdbRecord)

 
scan a PDB file for PDB SSBOND header fields.
call addDisulfideBond as appropriate
cisPeptide(startResid, segName=' ')

 
given a startResid, set up topology to make a cis peptide bond between
residues numbers startResid and startResid+1.
 
Call this routine after seqToPSF.
 
This function correctly treats bonds involving proline and non-proline
residues.
 
The optional segName argument argument should be specified if there is
more than one segment in the structure.
dAmino(resid, segName=' ')

 
change given residue to a D-amino acid.
 
Call this routine after seqToPSF.
 
The optional segName argument argument should be specified if there is
more than one segment in the structure.
deduceSeqType(seq)

 
given a 3 character residue name, determine whether it's protein or
nucleic acid. DNA/RNA disambiguation is not always possible. The
default is RNA.
 
To make this determination, residue names are obtain from the current
values of the protein and nucleic topology files (set in protocol).
grabResidueNames(file)

 
find all residue names in the given file.
pdbToPSF(pdbRecord, psfFilename='', customRename=False)

 
given a PDB record, generate XPLOR PSF structure/topology info.
 
The PDB record can be a filename or a string containing PDB contents.
 
See seqToPSF for documentation on customRename.
pdbToSeq(pdbRecord, useSeqres=False, useChainID=True)

 
return a list of list of sequences.
side effect: set the global variable beginResid
 
If useChainID is set, chainID overrides segment name, if it is set.
renameAtoms(sel='all')

 
renameResidues(seq)

 
single letter to three letter names
seqToPSF(seq, seqType='auto', startResid=1, deprotonateHIS=1, segName=' ', disulfide_bonds=[], disulfide_bridges=[], amidate_cterm=0, customRename=False, sync=True)

 
given a primary protein or nucleic acid sequence, generate PSF info
and load the appropriate parameters.
 
The seq argument can be a string or the name of a file containing the
sequence.
 
if seqType is auto, the type (protein, dna) is determined from the
sequence. type 'rna' must be explicitly specified.
 
If deprotonateHIS is set, the HD1 atom is deleted from Histidines. This is
the default.
 
If segName is shorter than four characters, leading characters are
space-padded. It is an error for it to be longer than 4 characeters.
 
didulfide bonds are specified by a list of resid pairs in either
disulfide_bonds or disulfide_bridges. Use disulfide_bonds for actual bonds
and disulfide_bridges to remove the cysteine HG proton- for representing
disulfide bonds by NOE restraints.
 
If customRename is set, certain convenient atom renamings are made for
nucleic acids:
        ADE H61 --> HN'   
        ADE H62 --> HN''  
        GUA H21 --> HN'   
        GUA H22 --> HN''  
        CYT H41 --> HN'   
        CYT H42 --> HN''  
        THY C5A --> CM
 
The sync argument specifies whether XPLOR arrays are copied back to
the C++ interface. This should almost always be the default value, True
seqres(lines)

 
read the pdb SEQRES field
return a list of lists of sequences.
 
SEQRES fields include chain specifiers. If this is blank the segid
is set from the first ATOM entry.

 
Data
        __package__ = None
deduceSeqType_first = True
residueMap = {'A': 'ADE', 'C': 'CYT', 'G': 'GUA', 'HOH': 'WAT', 'I': 'INO', 'T': 'THY'}
residueTypes = {'metal': [], 'nucleic': [], 'protein': [], 'water': []}
terminalAtoms = ['H5T', 'H3T']