molecupy.structures.models (The Model class)¶
Contains the Model class.
-
class
molecupy.structures.models.Model[source]¶ Base class:
AtomicStructureRepresents the structural environment in which the other structures exist.
-
small_molecules()[source]¶ Returns all the
SmallMoleculeobjects in this model.Return type: set
-
add_small_molecule(small_molecule)[source]¶ Adds a small molecule to the model.
Parameters: small_molecule (SmallMolecule) – The small molecule to add.
-
remove_small_molecule(small_molecule)[source]¶ Removes a small molecule from the structure.
Parameters: small_molecule (SmallMolecule) – The small molecule to remove.
-
get_small_molecule_by_id(molecule_id)[source]¶ Returns the first small molecule that matches a given molecule ID.
Parameters: molecule_id (str) – The molecule ID to search by. Return type: SmallMoleculeorNone
-
get_small_molecule_by_name(molecule_name)[source]¶ Returns the first small molecules that matches a given name.
Parameters: molecule_name (str) – The name to search by. Return type: SmallMoleculeorNone
-
get_small_molecules_by_name(molecule_name)[source]¶ Returns all the small molecules of a given name.
Parameters: molecule_name (str) – The name to search by. Return type: setofSmallMoleculeobjects.
-
duplicate_small_molecule(small_molecule, molecule_id=None)[source]¶ Creates a copy of a small molecule in the Model. The coordinates will be identical but it will have a unique ID.
Parameters: - small_molecule (SmalllMolecule) – The molecule to duplicate.
- molecule_id (str) – If given, this will determine the ID of the new molecule.
-
remove_chain(chain)[source]¶ Removes a chain from the structure.
Parameters: chain (Chain) – The chain to remove.
-
get_chain_by_id(chain_id)[source]¶ Returns the first chain that matches a given chain ID.
Parameters: chain_id (str) – The chain ID to search by. Return type: ChainorNone
-
duplicate_chain(chain, chain_id=None)[source]¶ Creates a copy of a chain in the Model. The coordinates will be identical but it will have a unique ID.
Parameters: - chain (Chain) – The chain to duplicate.
- chain_id (str) – If given, this will determine the ID of the new chain.
-
add_bind_site(site)[source]¶ Adds a bind site to the model.
Parameters: site (BindSite) – The bind site to add.
-
remove_bind_site(site)[source]¶ Removes a bind site from the structure.
Parameters: site (BindSite) – The bind site to remove.
-
get_bind_site_by_id(site_id)[source]¶ Returns the first bind site that matches a given site ID.
Parameters: site_id (str) – The site ID to search by. Return type: BindSiteorNone
-
add_complex(complex_)[source]¶ Adds a complex to the model.
Parameters: complex (Complex) – The complex to add.
-
remove_complex(complex_)[source]¶ Removes a complex from the model.
Parameters: complex (Complex) – The complex to remove.
-
get_complex_by_id(complex_id)[source]¶ Returns the first complex that matches a given complex ID.
Parameters: complex_id (str) – The complex ID to search by. Return type: ComplexorNone
-
get_complex_by_name(complex_name)[source]¶ Returns the first complex that matches a given name.
Parameters: complex_name (str) – The name to search by. Return type: ComplexorNone
-
get_complexes_by_name(complex_name)[source]¶ Returns all the complexes of a given name.
Parameters: complex_name (str) – The name to search by. Return type: setofComplexobjects.
-
duplicate_complex(complex_, complex_id=None, complex_name=None)[source]¶ Creates a copy of a complex in the Model. The coordinates will be identical but it will have a unique ID.
Parameters: - complex (Complex) – The complex to duplicate.
- complex_id (str) – If given, this will determine the ID of the new complex.
- complex_name (str) – If given, this will determine the name of the new complex.
-
to_pdb_data_file()[source]¶ Converts the Model to a
PdbDataFile.
-