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.
    
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 seq2PSF.
 
    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 seq2PSF.
 
    The optional segName argument argument should be specified if there is
    more than one segment in the structure.
    
deduceSeqType(seq)
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)
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 (prot, 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    
    
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
        residueMap = {'A': 'ADE', 'C': 'CYT', 'G': 'GUA', 'I': 'INO', 'T': 'THY'}
residueTypes = {'dna': ['CYT', 'GUA', 'ADE', 'THY', 'C', 'G', 'I', 'INO', 'U', 'URA', 'URI'], 'prot': ['ALA', 'ARG', 'ASN', 'ASP', 'CYS', 'GLN', 'GLU', 'GLY', 'HIS', 'ILE', 'LEU', 'LYS', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL', ...]}
terminalAtoms = ['H5T', 'H3T']