packman.molecule.atom module¶
The ‘Atom’ object host file.
This is file information, not the class information. This information is only for the API developers. Please read the ‘Atom’ 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 Atom
help( Atom )
- Authors:
- Pranav Khade(https://github.com/Pranavkhade)
-
class
packman.molecule.atom.Atom(id, AtomName, Coordinates, Occupancy, bfactor, Element, Charge, parent)¶ Bases:
objectThis class contains the information about the ‘Atom’ object (packman.molecule.Atom).
This class contains all the information available about the Atom. The Atom class is the lowest 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
- Most essential class of all as it stores the actual data of the atoms.
- 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) – Atom ID from the PDB file as it is. Each Atom in a PDB file Model/Frame has unique ID. (essential)
- AtomName (str) – Atom Name from the PDB file as it is.
- Coordinates (numpy.array) – The 3*1 array of coordinates/location of the atoms. (essential)
- Occupancy (float) – The value of the occupancy.
- bfactor (float) – The B-factor/Temperature Factor/ Debye Waller Factor of the atom. (For NMR structures, it is RMSF accross the frames)
- Element (str) – Element information of the given ‘Atom’ object. (Element from the Periodic Table)
- Charge (float) – Charnge of the given ‘Atom’ object.
- parent (packman.molecule.Residue) – The Residue Object (parent) this atom belongs to.
- AlternateLocationIndicator (bool) – If the alternate location available for the atom (To be removed in future)
-
calculate_distance(another_atom)¶ Calculate the Distance between the given ‘Atom’ and another ‘Atom’
Parameters: another_atom (packman.molecule.atom.Atom) – The ‘Atom’ User wishes to calculate distance from. Returns: float if successful, None otherwise.
-
get_alternatelocationindicator()¶ Know if the given ‘Atom’ has Alternate Location Information
Note
This feature might be removed in the future.
Returns: True if successful, False otherwise.
-
get_bfactor()¶ Get the B-factor/Temperature Factor/ Debye Waller Factor of the given ‘Atom’
Returns: float if successful, None otherwise.
-
get_bond(atom2)¶ Get the specific bond with the specific atom.
Parameters: atom2 (packman.molecule.Atom/ int) – ‘Atom’ object or the atom id. Returns: Bond (packman.molecule.Bond) if successful, None if bond does not exist.
-
get_bonds()¶ Get the bonds for the given ‘Atom’
Returns: list of packman.molecule.Bond if successful; [] otherwise.
-
get_charge()¶ Get the Charge of the given ‘Atom’
Returns: str if successful, None otherwise.
-
get_domain_id()¶ Get the Domain Identifier of the given ‘Atom’. Hinge Prediction is Necessary for this option.
Note
Domain Identifiers (Obtained after running PACKMAN): ‘FL’: Flexible Linkers (Hinges); Followed by the domain number ‘DM’: Domain; Followed by the domain number
Returns: str if successful, None otherwise.
-
get_element()¶ Get the Element of the given ‘Atom’
Returns: str if successful, None otherwise.
-
get_id()¶ Get the ID of the ‘Atom’
Returns: int if successful, None otherwise.
-
get_location()¶ Get the Coordinates/Location of the given ‘Atom’
Returns: numpy.array if successful, None otherwise.
-
get_name()¶ Get the Name of the ‘Atom’
Returns: str if successful, None otherwise.
-
get_occupancy()¶ Get the Occupancy of the given ‘Atom’
Returns: float if successful, None otherwise.
-
get_parent()¶ Get the ‘Residue’ the given ‘Atom’ belongs to.
Returns: packman.molecule.Residue if successful, None otherwise.
-
get_property(property_name)¶ Get the Property of the given ‘Atom’.
Property is any key and value combination that can be assigned to this object. This (along with the set_property) feature is mainly useful for the user customization. Properties are like pinboards. You can pin anything to the object with a key as a pin.
Parameters: property_name (object) – The ‘Key’ or a name the user wants to assign to to the property Note
- Users can add custom annotations; for example: If particular chain becomes disordered, it can be annotated with this feature.
-
get_segmentidentifier()¶ Get the Segment Identifier of the given ‘Atom’
Returns: str if successful, None otherwise.
-
set_alternatelocationindicator(new_alternatelocationindicator)¶ Set the Alternate Location Indicator of the given ‘Atom’
Parameters: new_alternatelocationindicator – The Alternate Location Indicator User wishes to assign to the given ‘Atom’
-
set_bfactor(new_bfactor)¶ Set the B-factor/Temperature Factor/ Debye Waller Factor of the given ‘Atom’
Parameters: new_bfactor (float) – The B-factor/Temperature Factor/ Debye Waller Factor User wishes to assign to the given ‘Atom’
-
set_bond(new_bond)¶ Set the atom to the given ‘Atom’
Parameters: new_bond (packman.molecule.Bond) – Add new bond to the given ‘Atom’ Note
- Yet to add the functionality to delete the specific bonds.
-
set_charge(new_charge)¶ Set the Charge of the given ‘Atom’
Parameters: new_charge (str) – The Charge User wishes to assign to the given ‘Atom’
-
set_elment(new_element)¶ Set the Element of the given ‘Atom’
Parameters: new_element (str) – The Element User wishes to assign to the given ‘Atom’
-
set_id(new_id)¶ Set the ID of the given ‘Atom’
Parameters: new_id (int) – The ID User wishes to assign to the given ‘Atom’
-
set_location(new_location)¶ Set the Coordinates/Location of the given ‘Atom’
Parameters: new_location (numpy.array) – The Coordinates/Location User wishes to assign to the given ‘Atom’
-
set_name(new_name)¶ Set the Name of the given ‘Atom’
Parameters: new_name (str) – The Name User wishes to assign to the given ‘Atom’
-
set_occupancy(new_occupancy)¶ Set the Occupancy of the given ‘Atom’
Parameters: new_occupancy – The Occupancy User wishes to assign to the given ‘Atom’
-
set_parent(new_parent)¶ Set the Parent ‘Residue’ of the given ‘Atom’
Parameters: new_parent (packman.molecule.residue.Residue) – The parent ‘Residue’ User wishes to assign to the given ‘Atom’
-
set_property(property_name, value)¶ Set the Property of the given ‘Atom’.
Property is any key and value combination that can be assigned to this object. This (along with the get_property) feature is mainly useful for the user customization. Properties are like pinboards. You can pin anything to the object with a key as a pin.
Parameters: - property_name (object) – The ‘Key’ or a name the user wants to assign to to the property
- value (object) – The value the user wants to assign to the property
Note
- Users can add custom annotations; for example: If particular amino acid becomes disordered, it can be annotated with this feature.
-
set_segmentidentifier(new_segmentidentifier)¶ Set the Segment Identifier of the given ‘Atom’
Parameters: new_segmentidentifier (str) – The Segment Identifier User wishes to assign to the given ‘Atom’