molecupy.pdb.access
(PDB Access)¶
This module contains the functions used to access PDB files themselves. These are the only functions to be imported into the top level directory, and so are all accesisble by importing molecupy itself.
-
molecupy.pdb.access.
pdb_from_string
(text)[source]¶ Creates a
Pdb
object from the text of a PDB file.Parameters: string (str) – The raw text of a PDB file. Return type: Pdb
-
molecupy.pdb.access.
pdb_data_file_from_string
(text)[source]¶ Creates a
PdbDataFile
object from the text of a PDB file.Parameters: string (str) – The raw text of a PDB file. Return type: PdbDataFile
-
molecupy.pdb.access.
pdb_file_from_string
(text)[source]¶ Creates a
PdbFile
object from the text of a PDB file.Parameters: string (str) – The raw text of a PDB file. Return type: PdbFile
-
molecupy.pdb.access.
get_pdb_from_file
(path, processing='pdb')[source]¶ Creates a
Pdb
,PdbDataFile
, orPdbFile
from a file path on disk - the default behaviour being to create aPdb
.Parameters: - path (str) – The location of the PDB file on disk.
- processing (str) – The level of processing you want the returned object to have. Propviding
"pdbfile"
will just return aPdbFile
,"datafile"
will return aPdbDataFile
, and"pdb"
(the default) will return a fully processedPdb
object.
Raises: FileNotFoundError – if there is no file at the specified location.
-
molecupy.pdb.access.
get_pdb_remotely
(code, processing='pdb')[source]¶ Creates a
Pdb
,PdbDataFile
, orPdbFile
from a 4-letter PDB code - the default behaviour being to create aPdb
.Parameters: - code (str) – The 4-letter PDB code.
- processing (str) – The level of processing you want the returned object to have. Propviding
"pdbfile"
will just return aPdbFile
,"datafile"
will return aPdbDataFile
, and"pdb"
(the default) will return a fully processedPdb
object.
Raises: InvalidPdbCodeError – if there is no PDB with the given code.