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
Pdbobject 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
PdbDataFileobject 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
PdbFileobject 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, orPdbFilefrom 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 processedPdbobject.
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, orPdbFilefrom 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 processedPdbobject.
Raises: InvalidPdbCodeError – if there is no PDB with the given code.