- class openff.nagl.nn.DGLMoleculeDatasetEntry(molecule: DGLMolecule, labels: Dict[str, Tensor])[source]
Bases:
NamedTuple
A named tuple containing a featurized molecule graph, a tensor of the atom features, and a tensor of the molecule label.
Methods
Create a dataset entry from a mapped SMILES string.
Attributes
- classmethod from_mapped_smiles(mapped_smiles: str, labels: Dict[str, Any], atom_features: List[AtomFeature], bond_features: List[BondFeature], atom_feature_tensor: Tensor | None = None, bond_feature_tensor: Tensor | None = None)[source]
Create a dataset entry from a mapped SMILES string.
- Parameters:
mapped_smiles – The mapped SMILES string.
labels – The labels for the dataset entry. These will be converted to Pytorch tensors.
atom_features – The atom features to use. If this is provided, an atom_feature_tensor should not be provided as it will be generated during featurization.
bond_features – The bond features to use. If this is provided, a bond_feature_tensor should not be provided as it will be generated during featurization.
atom_feature_tensor – The atom feature tensor to use. If this is provided, atom_features should not be provided as it will be ignored.
bond_feature_tensor – The bond feature tensor to use. If this is provided, bond_features should not be provided as it will be ignored.