packman.molecule.protein module¶
The ‘Protein’ object host file.
This is file information, not the class information. This information is only for the API developers. Please read the ‘Protein’ object documentation for details.
- Citation:
- Pranav M Khade, Robert L Jernigan, PACKMAN-Molecule: Python Toolbox for Structural Bioinformatics, Bioinformatics Advances, 2022;, vbac007, https://doi.org/10.1093/bioadv/vbac007
Example:
from packman.molecule import Protein
help( Protein )
Note
- Top in the hierarchy
- Authors:
- Pranav Khade(https://github.com/Pranavkhade)
-
class
packman.molecule.protein.Protein(id, Models)¶ Bases:
objectThis class contains the information about the ‘Protein’ object (packman.molecule.Protein).
This class contains all the information available about the Protein and stores everything in itself. The Protein class is the highest in the hierarchy of the ‘molecule’ API classes. the order of hierarchy being: Protein> Model> Chain> Residue> Atom. This class is also the component of the ‘molecule’ module API. Please read the Tutorials and Documentation for more details.
Note
- Please refer to the [https://web.archive.org/web/20080905024351/http://www.wwpdb.org/docs.html] for the description of the arguments.
Parameters: - id (int) – Protein ID
- name (str) – Protein Name
- Models ([packman.molecule.Model]) – Protein models/frames of the structure. (NMR files usually have multiple conformers of the same protein)
-
get_data()¶ Get the misc data (other than coordinates) from the file.
Returns: Array of Strings
-
get_id()¶ Get the ID for the Protein object.
Returns: String if successful, None otherwise.
-
get_models()¶ Get all the models at once. Useful for the iterations.
Returns: Generator of all the models in the PDB file.
-
get_sequence(all_models=False)¶ _summary_
Parameters: all_models (bool, optional) – Get sequence of the all frames; useless if sequence accross the models is identical. Defaults to False. Returns: Protein sequence in FASTA format.
-
set_data(data)¶ Set the misc data (other than coordiantes) to the Protein object.
Parameters: data (array) – Array of String Note
- All the properties are planned to be put in specific format to achieve complete interformat conversion.
-
write_cif(filename)¶ Write a PDBx/mmCIF (.cif) file from the Protein object.
Parameters: filename (str) – Name of the output file user wishes to assign.
-
write_pdb(filename)¶ Write a PDB (.pdb) file from the Protein object.
Parameters: filename (str) – Name of the output file user wishes to assign.
-
write_structure(filename, ftype='cif')¶ Write the ‘Protein’ object to the file.
- CIF file format is default because it has more advantages over PDB format and PDB format is ‘frozen’. Please read following for more information::
- https://www.wwpdb.org/documentation/file-formats-and-the-pdb
Parameters: - filename (str) – Name of the output file user wishes to assign.
- ftype (str) – Format for the file (pdb / cif)