icolos.core.containers package#
Submodules#
icolos.core.containers.compound module#
- class icolos.core.containers.compound.Compound(name: str = '', compound_number: Optional[int] = None)[source]#
Bases:
object
This class bundles all information on a molecule and serves mainly to group enumerations.
- add_enumeration(enumeration: Enumeration, auto_update: bool = True)[source]#
Add a new enumeration. If “auto_update” is True, the Compound class will be set to “self” and the enumeration_id will be set to the next free index.
- add_enumerations(enumerations: List[Enumeration], auto_update: bool = True)[source]#
Add new enumerations. If “auto_update” is True, the Compound class will be set to “self” and the enumeration_id will be set to the next free index.
- find_enumeration(enumeration_id: int) Enumeration [source]#
- get_enumerations() List[Enumeration] [source]#
- class icolos.core.containers.compound.Conformer(conformer: Optional[Mol] = None, conformer_id: Optional[int] = None, enumeration_object=None)[source]#
Bases:
object
This class is a storage class for individual conformers associated with a given Enumeration.
- class icolos.core.containers.compound.Enumeration(compound_object=None, smile: str = '', molecule: Optional[Mol] = None, original_smile: Optional[str] = None, enumeration_id: Optional[int] = None)[source]#
Bases:
object
This class bundles all information on an enumeration, especially all conformers generated.
- add_conformer(conformer: Conformer, auto_update: bool = True)[source]#
Add a new conformer. If “auto_update” is True, the Enumeration class will be set to “self” and the conformer_id will be set to the next free index.
- icolos.core.containers.compound.get_compound_by_id(compounds: List[Compound], id: int) Compound [source]#
- icolos.core.containers.compound.get_compound_by_name(compounds: List[Compound], name: str) Compound [source]#
- icolos.core.containers.compound.unroll_conformers(compounds: List[Compound]) List[Conformer] [source]#
- icolos.core.containers.compound.unroll_enumerations(compounds: List[Compound]) List[Enumeration] [source]#
icolos.core.containers.generic module#
- class icolos.core.containers.generic.GenericContainer[source]#
Bases:
object
Container class to hold the instances of the Generic class, separated by extension
- add_file(file: GenericData)[source]#
- add_files(files: List[GenericData])[source]#
- get_argument_by_extension(ext, rtn_file_object=False) Union[GenericData, str] [source]#
- get_files_by_extension(ext: str) List[Optional[GenericData]] [source]#
- get_flattened_files() List[GenericData] [source]#
icolos.core.containers.gmx_state module#
- class icolos.core.containers.gmx_state.AtomType(*, number: int, a_type: str, resi: int, res: str, atom: str, cgnr: int, charge: float, mass: float)[source]#
Bases:
BaseModel
- a_type: str#
- atom: str#
- cgnr: int#
- charge: float#
- mass: float#
- number: int#
- res: str#
- resi: int#
- class icolos.core.containers.gmx_state.GromacsState(*, top_lines: List = [], itps: Dict = {}, posre: Dict = {}, atomtypes: List = [], chains: List = None, forcefield: str = 'amber03', water: str = 'tip3p', system: List = [], molecules: Dict = {}, structures: Dict = {}, tprs: Dict = {}, trajectories: Dict = {}, log: Dict = {}, edr: Dict = {}, cpt: Dict = {}, ndx: List = [], properties: Dict[str, List] = {})[source]#
Bases:
BaseModel
- atomtypes: List#
- chains: List#
- collect_atomtypes() List [source]#
Iterate over the itp files, strip any newly defined atomtypes, append to their own atomtypes.itp file, include this just after the forcefield include
- cpt: Dict#
- edr: Dict#
- forcefield: str#
- itps: Dict#
- log: Dict#
- molecules: Dict#
- ndx: List#
- parse(path: str, file: str = 'topol.top')[source]#
Populate the fields from parsing a topol file (normally from gmx pdb2gmx) If a moleculetype has been defined in a single topology, this is separated into its own itp file
- posre: Dict#
- properties: Dict[str, List]#
- set_topol(path: str, file: str = 'topol.top')[source]#
When solvate or genion produce a modified topol, read this into the topology lines
- structures: Dict#
- system: List#
- top_lines: List#
- tprs: Dict#
- trajectories: Dict#
- water: str#
icolos.core.containers.perturbation_map module#
- class icolos.core.containers.perturbation_map.Edge(*, node_from: Node = Node(node_id=None, node_hash=None, conformer=None, node_connectivity=[]), node_to: Node = Node(node_id=None, node_hash=None, conformer=None, node_connectivity=[]), total: str = None, mcs: str = None, chg: str = None, softbond: str = None, min_no_atoms: str = None, snapCoreRmsd: str = None, bidirSnapCoreRmsd: str = None, status: ParallelizationEnum = ParallelizationEnum.STATUS_SUCCESS, ddG: float = 0.0, ddG_err: float = 0.0)[source]#
Bases:
BaseModel
- bidirSnapCoreRmsd: str#
- chg: str#
- ddG: float#
- ddG_err: float#
- mcs: str#
- min_no_atoms: str#
- snapCoreRmsd: str#
- softbond: str#
- status: ParallelizationEnum#
- total: str#
- class icolos.core.containers.perturbation_map.Node(*, node_id: str = None, node_hash: str = None, conformer: Conformer = None, node_connectivity: List = [])[source]#
Bases:
BaseModel
- node_connectivity: List#
- node_hash: str#
- node_id: str#
- class icolos.core.containers.perturbation_map.PerturbationMap(*, nodes: List[Node] = [], edges: List[Edge] = [], hash_map: Dict = {}, compounds: List[Compound] = [], protein: GenericData = None, vmap_output: IFrame = None, replicas: int = 3, node_df: DataFrame = None, strict_execution: str = False, hub_conformer: Conformer = None)[source]#
Bases:
BaseModel
Hold a map construction parsed from a csv (probabably from a parsed schrodinger log file or something) and provide some utility methods for doing pmx calculations on the edges
- get_edge_by_id(id: str) Optional[Edge] [source]#
Lookup edge by identifier
- Parameters:
id (str) – edge hash to retrieve
- Return Optional[Edge]:
Return the edge if found, else None
- get_protein() GenericData [source]#
- hash_map: Dict#
- node_df: DataFrame#
- parse_map_file(file_path: str) None [source]#
Parse map from Schrodinger’s fep_mapper log file, build internal graph representation + attach properties from fmp_stats, if provided
- Parameters:
file_path (str) – path to the fep_mapper.log file to extract the perturbation map from
- protein: GenericData#
- replicas: int#
- strict_execution: str#
- visualise_perturbation_map(write_out_path: str) None [source]#
Generate NetworkX graph for the parsed perturbation map
- Parameters:
write_out_path (str) – directory to write output file
- vmap_output: IFrame#