Becksteinlab / GromacsWrapper

GromacsWrapper wraps system calls to GROMACS tools into thin Python classes (GROMACS 4.6.5 - 2024 supported).
https://gromacswrapper.readthedocs.org
GNU General Public License v3.0
169 stars 53 forks source link

top reader is mostly broken #61

Closed orbeckst closed 7 years ago

orbeckst commented 8 years ago

Not all of the current tests pass. Need to either fix bugs or adjust tests.

orbeckst commented 8 years ago

@jandom can you have a look – you wrote most of these tests.

With Gromacs 4.6.5, I get the following

(develop) yngvi:temp oliver$ nosetests -v ../gromacs/
gromacs.tests.test_basic.test_empty ... ok
gromacs.tests.test_example.test_empty ... ok
test_fileformats.test_fileformats ... ok
test_amber03star.TestCharmm.test_basic ... ok
Load the same topology twice and check if __eq__ comparisions work ... ok
Check if grompp can be run successfully at all ... ok
Check if grompp can be run successfully at all ... ERROR
Called by `test_parameters()` for each molecule in the system ... ok
Test if all the parameter types are the same across two topologies ... ok
Test if per-molecule parameters and parameter type assignments are identical ... ok
Read a topology, write it out, and read in the output again. ... ERROR
test_amber03w.TestCharmm.test_basic ... ok
Load the same topology twice and check if __eq__ comparisions work ... ok
Check if grompp can be run successfully at all ... ERROR
Check if grompp can be run successfully at all ... ERROR
Called by `test_parameters()` for each molecule in the system ... ok
Test if all the parameter types are the same across two topologies ... ok
Test if per-molecule parameters and parameter type assignments are identical ... ok
Read a topology, write it out, and read in the output again. ... ERROR
test_charmm22.TestCharmm.test_basic ... ok
Load the same topology twice and check if __eq__ comparisions work ... ok
Check if grompp can be run successfully at all ... ok
Check if grompp can be run successfully at all ... /Volumes/Data/oliver/Biop/Projects/Methods/GromacsWrapper/gromacs/tests/test_fileformats/test_top/top.py:153: FutureWarning: sort(....) is deprecated, use sort_index(.....)
  assert_frame_equal(df1.sort(axis=1), df2.sort(axis=1), check_names=True)
/Volumes/Data/oliver/Biop/Projects/Methods/GromacsWrapper/gromacs/tests/test_fileformats/test_top/top.py:165: FutureWarning: sort(....) is deprecated, use sort_index(.....)
  assert_frame_equal(df1[unscaled_terms].sort(axis=1), df3[unscaled_terms].sort(axis=1), check_names=True)
/Volumes/Data/oliver/Biop/Projects/Methods/GromacsWrapper/gromacs/tests/test_fileformats/test_top/top.py:166: FutureWarning: sort(....) is deprecated, use sort_index(.....)
  assert_frame_equal(df1[scaled_terms].sort(axis=1), 2*df3[scaled_terms].sort(axis=1), check_names=True)
ok
Called by `test_parameters()` for each molecule in the system ... ok
Test if all the parameter types are the same across two topologies ... ok
Test if per-molecule parameters and parameter type assignments are identical ... ok
Read a topology, write it out, and read in the output again. ... ERROR

Same failures with py.test:

py.test gromacs

Part of the output:

============================= test session starts ==============================
platform darwin -- Python 2.7.11, pytest-2.9.1, py-1.4.31, pluggy-0.3.1
rootdir: /Volumes/Data/oliver/Biop/Projects/Methods/GromacsWrapper/gromacs, inifile:
plugins: cov-2.2.1, pep8-1.0.6
collected 27 items

gromacs/tests/test_basic.py .
gromacs/tests/test_example.py .
gromacs/tests/test_fileformats/test_fileformats.py .
gromacs/tests/test_fileformats/test_top/test_amber03star.py .....F.F
gromacs/tests/test_fileformats/test_top/test_amber03w.py .....FFF
gromacs/tests/test_fileformats/test_top/test_charmm22.py .....F..

...

===================== 6 failed, 21 passed in 7.15 seconds ======================
orbeckst commented 8 years ago

Hi @jandom I know that you're busy but could you have a quick look at why some of your tests broke?

orbeckst commented 8 years ago

ping @jandom

orbeckst commented 8 years ago

In dd2c9a1 I marked the top tests with SKIP until someone finds the time to look at them.

orbeckst commented 8 years ago

I brought the tests in line with the rest (using pytest and tmpfile #47) but pretty much all the essential tests fail. They are currently marked as xfail (excpected failure) and contain an error message linking to this issue.

jandom commented 7 years ago

@orbeckst i just noted the existence of these email in my inbox – sorry thesis-mode – will have a look

jandom commented 7 years ago

@orbeckst jesus i'm seeing i've been the worst person in the universe for not handling this... 1yr, academia timelines... :D

jandom commented 7 years ago

@orbeckst @dotsdl this is ready for review, travis failures seem to be related to some other code