taps.apps.moldesign.chemfunctions¶
MorganFingerprintTransformer ¶
Bases: BaseEstimator, TransformerMixin
Class that converts SMILES strings to fingerprint vectors.
Source code in taps/apps/moldesign/chemfunctions.py
fit() ¶
transform() ¶
Compute the fingerprints.
Parameters:
Returns:
-
Any–Array of fingerprints.
Source code in taps/apps/moldesign/chemfunctions.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/chemfunctions.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/chemfunctions.py
compute_morgan_fingerprints() ¶
compute_morgan_fingerprints(
smiles: str,
fingerprint_length: int,
fingerprint_radius: int,
) -> ndarray
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:
-
ndarray–Array with shape
[hparams, fingerprint_length]of the Morgan fingerprint.
Source code in taps/apps/moldesign/chemfunctions.py
train_model() ¶
Train a machine learning model using Morgan Fingerprints.
Parameters:
-
smiles(list[str]) –SMILES strings for each molecule
-
properties(list[float]) –List of a property for each molecule
Returns:
-
Pipeline–A trained model.
Source code in taps/apps/moldesign/chemfunctions.py
run_model() ¶
Run a model on a list of smiles strings.
Parameters:
-
model(Any) –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.