Useful manipulations on PDB files
add_missing_single_chain_ids
(hierarchies, chain_id='A')[source]¶Add any missing chain ids
Use the first chain.id as the template or the supplied chain_id if none is present
extract_chain
(inpdb, outpdb, chainID=None, newChainID=None, cAlphaOnly=False, renumber=True)[source]¶Extract chainID from inpdb and renumner. If cAlphaOnly is set, strip down to c-alpha atoms
get_info
(inpath)[source]¶Read a PDB and extract as much information as possible into a PdbInfo object
keep_matching
(refpdb=None, targetpdb=None, outpdb=None, resSeqMap=None)[source]¶Only keep those atoms in targetpdb that are in refpdb and write the result to outpdb. We also take care of renaming any chains.
merge_chains
(pdbin, pdbout, chains=None)[source]¶Merge pdb chains.
If no chains argument is given merge all chains into the first chain, otherwise merge all but the first chain in chains into the first chain in chains.
Parameters
Returns: | pdbout – pdb output file for single chain pdb |
---|---|
Return type: | file |
num_atoms_and_residues
(pdbin, first=False)[source]¶“Return number of atoms and residues in a pdb file. If all is True, return all atoms and residues, else just for the first chain in the first model’
reliable_sidechains
(inpath=None, outpath=None)[source]¶Only output non-backbone atoms for residues in the res_names list.
reliable_sidechains_cctbx
(pdbin=None, pdbout=None)[source]¶Only output non-backbone atoms for residues in the res_names list.
renumber_residues_gaps
(pdbin, pdbout, gaps, start=1)[source]¶Renumber the residues in the chain based on specified gaps
Parameters: |
---|
split_into_chains
(pdbin, chain=None, directory=None)[source]¶Split a pdb file into its separate chains
split_pdb
(pdbin, directory=None, strip_hetatm=False, same_size=False)[source]¶Split a pdb file into its separate models
Parameters: |
---|
standardise
(pdbin, pdbout, chain=None, del_hetatm=False)[source]¶Rename any non-standard AA, remove solvent and only keep most probably conformation.
std_residues_cctbx
(pdbin, pdbout, del_hetatm=False)[source]¶Map all residues in MODRES section to their standard counterparts optionally delete all other HETATMS