Molecular Descriptors
Molecular descriptor featurizer using molfeat library.
- class openadmet.models.features.molfeat_properties.DescriptorFeaturizer(*args, descr_type: str, dtype: ~typing.Any = <class 'numpy.float32'>, n_jobs: int = -1)[source]
Bases:
MolfeatFeaturizerMolecular descriptor featurizer, relies on molfeat backend.
- Variables:
descr_type (str) – The type of descriptor to use, must be one of ‘mordred’, desc2 ‘desc3d’.
dtype (Any) – The data type to use for the fingerprint.
n_jobs (int) – The number of jobs to use for featurization, -1 for maximum parallelism.
- featurize(smiles: Iterable[str]) tuple[numpy.ndarray, numpy.ndarray][source]
Featurize a list of SMILES strings.
- Parameters:
smiles (Iterable[str]) – List or iterable of SMILES strings to featurize.
- Returns:
Tuple of (features, indices). Features is a 2D numpy array of shape ( n_samples, n_features) and indices is a 1D numpy array of the indices of the successfully featurized molecules.
- Return type:
tuple
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].