Skip to content

Commit

Permalink
Update test_protein_ligand_prep.py
Browse files Browse the repository at this point in the history
  • Loading branch information
talagayev authored Nov 1, 2023
1 parent fd6e170 commit 08e0c72
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions openmmdl/tests/openmmdl_simulation/test_protein_ligand_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,11 @@ def test_prepare_ligand():

# Add your assertions here to check if the preparation worked as expected
assert rdkit_mol is not None # Check if the result is not None

# Define test cases
@pytest.mark.parametrize("rdkit_mol, name, expected_num_atoms", [
(Chem.MolFromSmiles("CCO"), "Ethanol", 6), # Example with ethanol molecule
# Add more test cases as needed
])

def test_rdkit_to_openmm():
# Call the conversion function
rdkit_mol_supplier = Chem.SDMolSupplier(TEST_LIGAND_FILE, sanitize=False)
rdkit_mol = None # Initialize the variable
for mol in rdkit_mol_supplier:
if mol is not None: # Ensure the molecule is not None
rdkit_mol = mol # Assign the molecule to rdkit_mol
name="CVV"


omm_molecule = rdkit_to_openmm(rdkit_mol, name)


# Check if the result is an OpenMM Modeller
assert isinstance(omm_molecule, app.Modeller)

# Check the number of atoms in the OpenMM molecule
assert len(omm_molecule.topology.atoms()) == expected_num_atoms

if __name__ == '__main__':
pytest.main()

0 comments on commit 08e0c72

Please sign in to comment.