Esempio n. 1
0
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
Esempio n. 2
0
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
Esempio n. 3
0
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