API Documentation for pharmacophore
- class PharmacophoreGenerator(df_all, ligand_name)
A class for generating pharmacophore features from molecular dynamics (MD) interaction data.
This class processes interaction data from MD simulations and generates pharmacophore features including hydrogen bond donors/acceptors, hydrophobic features etc. exporting them in .pml format.
- Parameters:
df_all (pd.DataFrame) – DataFrame storing the input interaction data.
ligand_name (str) – Name of the ligand.
coord_pattern (re.Pattern) – Regular expression pattern for extracting 3D coordinates from strings.
clouds (dict) – Dictionary containing interaction types and associated 3D coordinates with visualization metadata.
- Variables:
complex_name (str) – Name of the complex consisting of ligand name and “_complex”.
- to_dict()
Export the interaction cloud as a dictionary.
- Returns:
Dictionary representation of the interaction cloud.
- Return type:
dict
- generate_md_pharmacophore_cloudcenters(output_filename, id_num=0)
Generates pharmacophore from all interactions formed in the MD simulation. A feature is generated for each interaction at the center of all its ocurrences.
- Parameters:
output_filename (str) – Name the of the output .pml file.
id_num (int) – ID number as an identifier in the PML file. Defaults to 0.
- Returns:
None. This function writes output directly to a .pml XML file and does not return anything.
- Return type:
None
- generate_point_cloud_pml(outname)
Generates pharmacophore point cloud and writes it to a .pml file.
- Parameters:
outname (str) – Name of the output .pml file.
- Returns:
None. This function writes output directly to a .pml file and does not return anything.
- Return type:
None
- generate_bindingmode_pharmacophore(dict_bindingmode, outname, id_num=0)
Generates pharmacophore from a binding mode and writes it to a .pml file.
- Parameters:
dict_bindingmode (dict) – Dictionary containing all interactions of the bindingmode and their coresponding ligand and protein coordinates.
outname (str) – Name of the output .pml file.
id_num (int) – if multiple id number can enumerate the diferent bindingmodes. Defaults to 0.
- Returns:
None. This function writes output directly to a .pml file and does not return anything.
- Return type:
None
- _generate_clouds()
Process the dataframe with the interactions to extract and categorize ligand/protein interactions.
- Returns:
A dict containing interaction types as keys and their 3D coordinates.
- Return type:
dict
- _format_clouds(interaction_coords)
Add visualization properties (color, radius) to the interactions.
- Parameters:
interaction_coords (dict) – Dictionary of raw 3D coordinates grouped by interaction type.
- Returns:
Dictionary formatted with interaction type as key, and a dictionary of coordinates, color, and radius as value.
- Return type:
dict
- _generate_pharmacophore_centers(interactions)
Generates pharmacophore points for interactions that are points such as hydrophobic and ionic interactions.
- Parameters:
interactions (list) – List of interactions to generate pharmacophore from.
- Returns:
Dict of interactions from which pharmacophore is generated as key and list of coordinates as value.
- Return type:
dict
- _generate_pharmacophore_vectors(interactions)
Generates pharmacophore points for interactions that are vectors such as hydrogen bond donors or acceptors.
- Parameters:
interactions (list) – List of interactions to generate pharmacophore vectors from.
- Returns:
Dict of interactions from which pharmacophore is generated as key and list of coordinates as value (first coords are ligand side, second are protein side).
- Return type:
dict
- _generate_pharmacophore_centers_all_points(interactions)
Generates pharmacophore points for all interactions to generate point cloud.
- Parameters:
interactions (list) – List of interactions to generate pharmacophore from.
- Returns:
Dict of interactions from which pharmacophore is generated as key and list of coordinates as value.
- Return type:
dict