def test_SmilesToLigandFeaturizer_rdkit(): ligand = SmilesLigand.from_smiles("CCCCC") system = System([ligand]) featurizer = SmilesToLigandFeaturizer(ligand_type="openforcefield") featurizer.featurize([system]) molecule = system.featurizations[featurizer.name] assert type(molecule) == OpenForceFieldLigand
def test_SmilesToLigandFeaturizer_rdkit(): ligand = SmilesLigand.from_smiles("CCCCC") system = System([ligand]) featurizer = SmilesToLigandFeaturizer(ligand_type="rdkit") featurizer.featurize([system]) molecule = system.featurizations[featurizer.name] assert type(molecule) == RDKitLigand
def test_SmilesToLigandFeaturizer_fails(): ligand = RDKitLigand.from_smiles("CCCCC") system = System([ligand]) featurizer = SmilesToLigandFeaturizer(ligand_type="openforcefield") with pytest.raises(ValueError): featurizer.featurize([system]) molecule = system.featurizations[featurizer.name] assert type(molecule) == OpenForceFieldLigand