The utils package#
These are the utility modules of Biobuild. They mostly serve in the background and keep everything going. Most users will not directly need to use these. However, they are documented here for completeness.
Default settings and constants#
- biobuild.utils.constants.BASE = '/home/docs/checkouts/readthedocs.org/user_builds/biobuild/envs/stable/lib/python3.11/site-packages/biobuild'#
The base directory of the package
- biobuild.utils.constants.RESOURCES = '/home/docs/checkouts/readthedocs.org/user_builds/biobuild/envs/stable/lib/python3.11/site-packages/biobuild/resources'#
The resources directory of the package
- biobuild.utils.defaults.DEFAULT_BOND_LENGTH = 1.6#
The default length of a bond in Angstrom
- biobuild.utils.defaults.DEFAULT_CHARMM_TOPOLOGY_FILE = '/home/docs/checkouts/readthedocs.org/user_builds/biobuild/envs/stable/lib/python3.11/site-packages/biobuild/resources/topology.pkl'#
The path to the default CHARMM topology file
- biobuild.utils.defaults.DEFAULT_PDBE_COMPONENT_FILES = {'amino_acids': '/home/docs/checkouts/readthedocs.org/user_builds/biobuild/envs/stable/lib/python3.11/site-packages/biobuild/resources/components_amino_acids.pkl', 'base': '/home/docs/checkouts/readthedocs.org/user_builds/biobuild/envs/stable/lib/python3.11/site-packages/biobuild/resources/components_base.pkl', 'lipids': '/home/docs/checkouts/readthedocs.org/user_builds/biobuild/envs/stable/lib/python3.11/site-packages/biobuild/resources/components_lipids.pkl', 'nucleotides': '/home/docs/checkouts/readthedocs.org/user_builds/biobuild/envs/stable/lib/python3.11/site-packages/biobuild/resources/components_nucleotides.pkl', 'small_molecules': '/home/docs/checkouts/readthedocs.org/user_builds/biobuild/envs/stable/lib/python3.11/site-packages/biobuild/resources/components_small.pkl', 'sugars': '/home/docs/checkouts/readthedocs.org/user_builds/biobuild/envs/stable/lib/python3.11/site-packages/biobuild/resources/components_sugars.pkl'}#
The paths to the default PDBe component files
- biobuild.utils.defaults.DEFAULT_SASA_N = 300#
The default number of points used to calculate solvent accessible surface area
- biobuild.utils.defaults.DEFAULT_SASA_PROBE_RADIUS = 1.4#
The default probe radius for calculating solvent accessible surface area
Other auxiliary utilities#
Utility and auxiliary functions
- class biobuild.utils.auxiliary.DummyBar(*args, **kwargs)[source]#
Bases:
objectA dummy progress bar
- class biobuild.utils.auxiliary.DummyStructure(residues)[source]#
Bases:
objectA dummy pdb structure
Used for the surface residue inference
- Parameters:
residues (list of Bio.PDB.Residue.Residue) – The residues to include in the structure
- biobuild.utils.auxiliary.chain_id_maker(cdx: int)[source]#
Make a string chain id from a counting integer
- Parameters:
cdx (int) – The counting integer
- Returns:
The chain id
- Return type:
str
- biobuild.utils.auxiliary.change_suffix(filename, suffix)[source]#
Change the suffix of a filename
- Parameters:
filename (str) – The filename
suffix (str) – The new suffix
- Returns:
The filename with the new suffix
- Return type:
str
- biobuild.utils.auxiliary.filename_to_id(filename)[source]#
Extract the id from a filename
- Parameters:
filename (str) – The filename
- Returns:
The id
- Return type:
str
- biobuild.utils.auxiliary.make_formula(atoms)[source]#
Make a chemical formula from a list of atoms
- Parameters:
atoms (list of Atoms) – The atoms. Each atom must have an element attribute (str).
- Returns:
The chemical formula
- Return type:
str