martimunicoy / peleffy

The peleffy (PELE Force Field Yielder) is a Python package that builds PELE-compatible force field templates.

Home Page:https://martimunicoy.github.io/peleffy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Impact class needs to be tested

martimunicoy opened this issue · comments

Description

Currently, Impact class is not tested. We should design some tests to check it out.

Cases to be tested

  • Impact template should complain when a non parameterized molecule is fetched.
  • Writer should be tested

Support

Set of three templates to use as reference: reference_templates.zip

  • metz: corresponds to the template we expect to obtain when loading the following molecule:
from offpele.topology import Molecule
from offpele.utils import get_data_file_path
from offpele.template import Impact

pdb_path = get_data_file_path('ligands/methane.pdb')
m = Molecule(pdb_path)
m.parameterize('openff_unconstrained-1.2.1.offxml')

impact = Impact(m)
  • malz: corresponds to the template we expect to obtain when loading the following molecule:
from offpele.topology import Molecule
from offpele.utils import get_data_file_path
from offpele.template import Impact

pdb_path = get_data_file_path('ligands/malonate.pdb')
m = Molecule(pdb_path)
m.parameterize('openff_unconstrained-1.2.1.offxml')

impact = Impact(m)
  • etlz: corresponds to the template we expect to obtain when loading the following molecule:
from offpele.topology import Molecule
from offpele.utils import get_data_file_path
from offpele.template import Impact

pdb_path = get_data_file_path('ligands/ethylene.pdb')
m = Molecule(pdb_path, tag='ETL')  # Note that in this case we are assigning a tag to the molecule which will be used in the Impact template
m.parameterize('openff_unconstrained-1.2.1.offxml')

impact = Impact(m)

Implementation

The following script has been implemented in order to test the class Impact: test_templates.py

Example

from test_templates import TestImpactTemplate
test = TestImpactTemplate()
  • Impact template should complain when a non parameterized molecule is fetched or the input format is incorrect:
test.test_input()
  • Testing the writer with a reference template using OFF:
test.test_writer_OFF()
  • Testing the writer with a reference template using OPLS:
test.test_writer_OPLS()

Support 2

I am attaching three reference Impact templates (corresponding to the ligands introduced in my previous post) obtained with the OPLS2005 force field: OPLS_reference_templates.zip