jade.basic.structure package¶
jade.basic.structure.BasicPose module¶
-
class
jade.basic.structure.BasicPose.
BasicPose
(pdb_file_path='')[source]¶ -
-
change_occupancy
()[source]¶ Changes ALL occupancies in a PDB dictionary to 1.00 Returns PDB Dictionary.
-
clean_PDB
()[source]¶ Removes HSD, Waters: Tries to fix atom and residue name inconsistencies. HAS worked for changing a single MD pdb (NAMD) frame to Rosetta file. PLEASE Expand if possible to alias all residues for Rosetta compatability. NOT gaurenteed, but SHOULD work ok.
-
combine_pdb
(py_pdb)[source]¶ Combines pdb_map from instance of PyPDB to this one. Does not do any checks.
-
copy_all_but_chains_into_pdb_map
(py_pdb, chains)[source]¶ Copies all data from one pdb_map of a py_pdb of all data except the specified chains into this one. Useful for reordering chains.
-
copy_chain_into_pdb_map
(py_pdb, chain)[source]¶ Copies all data from one pdb_map of a py_pdb of a chain into the one held in this class. Useful for reordering chains.
-
morph_line_in_pdb_map_to_pdb_line
(entry)[source]¶ Oh What fun. ;) Magic Numbers?: (6,5,4,3,1,4,8,8,8,4,5);
-
pdb_alias
(pairs, element)[source]¶ Replaces ALL occurances of old element with new from pair. pair is a dictionary. In C++ it would be an array of pairs. [string old]:[string new] For Specific functions, please see below.
-
pdb_atom_alias
(line_num, pair)[source]¶ Replaces atom_names with ones Rosetta is happy with. pair is a dictionary. In C++ it would be an array of pairs. [string MD atom_name]:[string rosetta atom_name]
-
pdb_chain_alias
(pairs)[source]¶ Replaces ALL occurances of old chain with new chain. pair is a dictionary. In C++ it would be an array of pairs. [string old chain]:[string new chain]
-
pdb_residue_alias
(pairs)[source]¶ Replaces ALL occurances of old residue with new residue. pair is a dictionary. In C++ it would be an array of pairs. [string old residue_name]:[string new residue_name]
-
read_file_and_replace_b_factors
(deliminator, filename='', resnum_column=1, chain_column=2, data_column=3, atomname_column=False)[source]¶ This function reads a deliminated file with data and inserts the data into the BFactor column. Used to visualize arbitrary data. Use function options to control which column the data is in as well as where your resnums and chains are located. If atomname column is given, will insert by atom instead of by residue
-
remove_alternate_residues
()[source]¶ Removes any alternate residue codes and renumbers by renumbering from 1 and integrating any inserts.
-
remove_element_column
()[source]¶ Removes the extra stuff in the element column, but not the element itself.
-
replace_atom_b_factor
(resnum, chain, atomname, data)[source]¶ Replaces the b factor of an atom. Can be all string representations or not.
-
replace_residue_b_factor
(resnum, chain, data)[source]¶ Replaces the b factor of each atom in the residue with data. Can be all string representations or not.
-
jade.basic.structure.BioPose module¶
-
class
jade.basic.structure.BioPose.
BioPose
(path, model_num=0)[source]¶ Bases:
object
This is my biopython meta class. Because biopython’s interface kinda sucks. This is a little cleaner.
The other way is to sublclass each Biopython class structure, which I’m not ready to do.
Right now, you need a path as I don’t know how we would use this from sequence, etc as you do in Rosetta. :path: Is a path to an RCSB file. PDB (.pdb), mmCIF(.cif), and gzipped (.gz) versions.
-
atom
(atom_name, resnum, chain_id, icode=' ', alt=' ', model_num=0)[source]¶ Get a Bio Atom of the stored structure
Parameters: - atom_name – str
- resnum – int
- chain_id – str
- icode – str
- alt – str
- model_num – int
Return type: bio.PDB.Atom.Atom
-
atoms
(resnum, chain_id, icode=' ', alt=' ', model_num=0)[source]¶ Get a list of Bio Atoms :param resnum: int :param chain_id: str :param icode: str :param alt: str :param model_num: int :rtype: list[bio.PDB.Atom.Atom]
-
chain
(chain_id, model_num=0)[source]¶ Get a Bio Chain of the stored structure :param chain_id: str :param model_num: int :rtype: bio.PDB.Chain.Chain
-
chains
(model_num=0)[source]¶ Get a list of Bio Chains :param model_num: int :rtype: list[bio.PDB.Chain.Chain
-
get_chain_ids
(model_num)[source]¶ Get all chain IDS for a model. :param model_num: int :rtype: list[str]
-
get_chain_length
(chain_id, model_num=0)[source]¶ Get the number of AA in a chain - Not including alternate res locations :param chain_id: str :rtype: int
-
get_sequence
(chain_id, model_num=0)[source]¶ Get a sequence of a chain - Not including alternate res locations
Parameters: - chain_id – str
- model_num – int
Return type: str
-
load_from_file
(path)[source]¶ Load a file from PDB or mmCIF. .gz is supported.
Parameters: path – Path to PDB or mmCIF file Return type: tuple(bio.PDB.Structure.Structure, dict)
-
model
(model_num=0)[source]¶ Get a Bio Model of the stored structure :param id: int :rtype: bio.PDB.Model.Model
-
omega
(i, rosetta_definitions=True)[source]¶ Get the Omega Angle of i in radians Omega is defined as the dihedral angle between the peptide bond of i and i + 1, as in Rosetta. If rosetta_definitions are False, omega is then treated as being between i and i -1
Parameters: - i – int
- reverse_rosetta_definitions – bool
Return type: float
-
reload_from_file
(path, model_num=0)[source]¶ Reload a BioPose from a file path. :param path: str :param model_num: int :return:
-
res_bond_distance
(resi)[source]¶ Get the stored bond distances between residue and residue+1 :param res: int :rtype: float
-
residue
(resnum, chain_id, icode=' ', alt=' ', model_num=0)[source]¶ Get a Bio Residue of the stored structure. Adds a chain_id attribute.
Parameters: - resnum – int
- chain_id – str
- icode – str
- alt – str
- model_num – int
Return type: bio.PDB.Residue.Residue
-
residues
(chain_id, model_num=0, include_alt=False)[source]¶ Get residues, including or not including residues with alternate location codes - which can be a PITA Adds chain_id attribute to residue.
Parameters: - chain_id – str
- model_num – int
- include_alt – bool
Return type: list[bio.PDB.Residue.Residue]
-
jade.basic.structure.SQLPose module¶
-
class
jade.basic.structure.SQLPose.
PDB_database
(database)[source]¶ This class is specifically for if we already have a database. Note: This is not a ROSETTA database. If you need to convert this, use ROSETTA (Which now works in PyRosetta!) Functions are to output the database as a PDB, output specific pieces of protein as a pdb and query the database.
-
save_cur_as_pdb
(outpath, supress_modelSep=False)[source]¶ Saves the DB at the current cursor to a file. Make sure cursor is on the pdb table.
-
save_whole_db_as_db
(filename, seperate_structures=False)[source]¶ Saves the whole database in MEMORY to a file….
-
scrub
(table_name)[source]¶ This should help protect from sql injection. Not that it’s important now, but… Author:OrangeOctopus from stack overflow
-
-
class
jade.basic.structure.SQLPose.
SQLPose
(pdbID, modelID, structID, memory=False, path='')[source]¶ -
fetch_and_read_pdb_into_database
(pdbID, read_header=False, header_only=False)[source]¶ Uses the PDB file specified, grabs it from the PDB, and reads the data in.
-
read_pdb_into_database_flat
(filePath, specific_chain=False, read_header=False, header_only=False)[source]¶ Reads the flat filepath specified into a database structure. This can then be parsed using the PDB_Database class. NOTE: Reading of header not implemented. if header_only is True, only loads the header. Useful for just getting specific information. More useful to D/L it from the pdb if possible. If Header only, reads the header into the database.
-
jade.basic.structure.Structure module¶
-
class
jade.basic.structure.Structure.
AntibodyResidueRecord
(aa, pdb_res_num, chain, icode=' ')[source]¶ Bases:
jade.basic.structure.Structure.ResidueRecord
Extension of Residue used to hold and access extra data used for renumbering/printing renumbering info I could backport python Enums, which would be incredibly useful here, but I don’t want to require the additional step.
- used in Python3.4
-
class
jade.basic.structure.Structure.
AntibodyStructure
[source]¶ Simple class for accessing Modified_AHO antibody numbering information outside of Rosetta.
-
class
jade.basic.structure.Structure.
PDBInfo
[source]¶ Bases:
object
Analogous to Rosetta PDBInfo Class I should start at 1
-
class
jade.basic.structure.Structure.
ResidueRecord
(one_letter_aa, pdb_num, chain, icode=' ')[source]¶ Bases:
object
Basic class to PDBInfo
jade.basic.structure.util module¶
-
jade.basic.structure.util.
atomic_distance
(res1, res2, res1_atom_name, res2_atom_name)[source]¶ Return the atomic distance between two arbitrary Bio residues and two arbitrary atom names. :param res1: Bio.PDB.Residue.Residue :param res2: Bio.PDB.Residue.Residue :param res1_atom_name: str :param res2_atom_name: str :rtype: float