taps.apps.moldesign.tasks¶
MorganFingerprintTransformer
¶
Bases: BaseEstimator
, TransformerMixin
Class that converts SMILES strings to fingerprint vectors.
Source code in taps/apps/moldesign/tasks.py
fit
¶
transform
¶
Compute the fingerprints.
Parameters:
Returns:
-
Any
–Array of fingerprints.
Source code in taps/apps/moldesign/tasks.py
generate_initial_xyz
¶
Generate the XYZ coordinates for a molecule.
Parameters:
-
mol_string
(str
) –SMILES string.
Returns:
-
str
–XYZ coordinates for the molecule.
Source code in taps/apps/moldesign/tasks.py
compute_vertical
¶
Run the ionization potential computation.
Parameters:
-
smiles
(str
) –SMILES string to evaluate.
Returns:
-
float
–Ionization energy in Ha.
Source code in taps/apps/moldesign/tasks.py
compute_morgan_fingerprints
¶
compute_morgan_fingerprints(
smiles: str,
fingerprint_length: int,
fingerprint_radius: int,
) -> NDArray[bool]
Get Morgan Fingerprint of a specific SMILES string.
Parameters:
-
smiles
(str
) –The molecule as a SMILES string.
-
fingerprint_length
(int
) –Bit-length of fingerprint.
-
fingerprint_radius
(int
) –Radius used to compute fingerprint.
Returns:
Source code in taps/apps/moldesign/tasks.py
train_model
¶
Train a machine learning model using Morgan Fingerprints.
Parameters:
-
train_data
(DataFrame
) –Dataframe with a 'smiles' and 'ie' column that contains molecule structure and property, respectfully.
Returns:
-
Pipeline
–A trained model.
Source code in taps/apps/moldesign/tasks.py
run_model
¶
Run a model on a list of smiles strings.
Parameters:
-
model
(Pipeline
) –Trained model that takes SMILES strings as inputs.
-
smiles
(list[str]
) –List of molecules to evaluate.
Returns:
-
DataFrame
–A dataframe with the molecules and their predicted outputs.
Source code in taps/apps/moldesign/tasks.py
combine_inferences
¶
Concatenate a series of inferences into a single DataFrame.
Parameters:
-
inputs
(DataFrame
, default:()
) –A list of the component DataFrames.
Returns:
-
DataFrame
–A single DataFrame containing the same inferences.