Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace ParmEd with Interchange in Amber/GROMACS example #1113

Merged
merged 29 commits into from
Nov 16, 2021

Conversation

mattwthompson
Copy link
Member

@mattwthompson mattwthompson commented Oct 27, 2021

  • Re-reun once Interchange v0.1.2 is online
  • Tag issue being addressed
  • Add tests
  • Update docstrings/documentation, if applicable
  • Lint codebase
  • Update changelog

@mattwthompson mattwthompson changed the title Replaced ParmEd with Interchange in Amber/GROMACS example Replace ParmEd with Interchange in Amber/GROMACS example Oct 27, 2021
@codecov
Copy link

codecov bot commented Oct 27, 2021

Codecov Report

Merging #1113 (8d62b9f) into master (08a51a6) will not change coverage.
The diff coverage is n/a.

Copy link
Member

@j-wags j-wags left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we endorse Interchange for use in small molecules, but not proteins (yet), it'd be good to keep the old ParmEd notebook around. So maybe here we could:

  • Rename the original notebook to be something like convert_to_amber_gromacs_using_parmed
  • Name the new notebook something like convert_amber_gromacs_lammps_using_interchange
  • Add a big notice at the top of each
    • ParmEd notebook: "Please take a look at the other notebook in the folder, showcasing how to use OpenFF interchange. Interchange is well-validated for small molecule conversion to several formats"
    • Interchange notebook: "We're working on replacing use of ParmEd with interchange... It works for small molecules but we expect there may be issues for larger things, we'd love feedback..."

@mattwthompson
Copy link
Member Author

I can't reproduce the test failures locally, even with downgrading to Python 3.7 and in a similar-ish-looking environment: https://gist.github.com/mattwthompson/eaef9191b31ce891816acfdb6e93f50e

@mattwthompson mattwthompson marked this pull request as ready for review November 2, 2021 15:56
@j-wags
Copy link
Member

j-wags commented Nov 2, 2021

Yeah, QCArchive seems to be down/unreachable. MolSSI is aware and they're working on resolving.

@mattwthompson
Copy link
Member Author

I'm getting errors from Sander in these tests, though:


_ examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb::Cell 9 _
Notebook cell execution failed
Cell 9: Cell execution caused an exception

Input:
get_amber_energies(interchange).energies

Traceback:

---------------------------------------------------------------------------
SanderError                               Traceback (most recent call last)
/tmp/ipykernel_4254/100924973.py in <module>
----> 1 get_amber_energies(interchange).energies

/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/openff/interchange/drivers/amber.py in get_amber_energies(off_sys, writer, electrostatics)
     69                 inpcrd_file="out.inpcrd",
     70                 in_file=in_file,
---> 71                 electrostatics=electrostatics,
     72             )
     73             return report

/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/openff/interchange/drivers/amber.py in _run_sander(inpcrd_file, prmtop_file, in_file, electrostatics)
    116 
    117     if sander.returncode:
--> 118         raise SanderError
    119 
    120     energies, _ = _group_energy_terms("mdinfo")

SanderError: 

_ examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb::Cell 10 _
Notebook cell execution failed
Cell 10: Cell execution caused an exception

Input:
get_summary_data(interchange)

Traceback:

---------------------------------------------------------------------------
SanderError                               Traceback (most recent call last)
/tmp/ipykernel_4254/736456265.py in <module>
----> 1 get_summary_data(interchange)

/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/openff/utilities/utilities.py in wrapper(*args, **kwargs)
     71                 raise e
     72 
---> 73             return function(*args, **kwargs)
     74 
     75         return wrapper

/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/openff/interchange/drivers/all.py in get_summary_data(interchange)
     39     kj_mol = unit.kilojoule / unit.mol
     40 
---> 41     energies = get_all_energies(interchange)
     42 
     43     for k, v in energies.items():

/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/openff/interchange/drivers/all.py in get_all_energies(interchange)
     27         "GROMACS": get_gromacs_energies(interchange),
     28         "LAMMPS": get_lammps_energies(interchange),
---> 29         "Amber": get_amber_energies(interchange, writer="internal"),
     30     }
     31 

/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/openff/interchange/drivers/amber.py in get_amber_energies(off_sys, writer, electrostatics)
     69                 inpcrd_file="out.inpcrd",
     70                 in_file=in_file,
---> 71                 electrostatics=electrostatics,
     72             )
     73             return report

/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/openff/interchange/drivers/amber.py in _run_sander(inpcrd_file, prmtop_file, in_file, electrostatics)
    116 
    117     if sander.returncode:
--> 118         raise SanderError
    119 
    120     energies, _ = _group_energy_terms("mdinfo")

SanderError: 

which do not occur locally.

@j-wags
Copy link
Member

j-wags commented Nov 2, 2021

Ahh, right, those should be independent from the QCA issues. Sorry - my brain is booting up slowly today. I'm looking into what's happening here.

@j-wags
Copy link
Member

j-wags commented Nov 2, 2021

Hm, one commit ago it was failing to find sander and lmp_serial. But as of the last commit (where I added the LAMMPS dep to the right yaml) it's just failing to find sander. So it IS picking up the LAMMPS dependency, but maybe something about the GROMACS/LAMMPS install is breaking AmberTools?

I'm also noticing that the new notebook PASSES on macos with RDKit only. Here's the breakdown:

  • macos, RDKit = Pass
  • macos, OpenEye = Fail w/ sander error
  • linux, RDKit = Fail w/ sander error
  • linux, OpenEye = Fail w/ sander error

@mattwthompson
Copy link
Member Author

No worries! I haven't implemented great error handling yet, since sometimes engines yell at me via STDOUT, sometimes via STDERR, and sometimes they're quiet and hide errors in a file.

If you or somebody else has time, It would be useful to see if this can be reproduced locally; if you can't, then I'll have to work on error handling and come back to this later.

@mattwthompson
Copy link
Member Author

The code to find sander is naive: https://github.com/openforcefield/openff-interchange/blob/v0.1.2/openff/interchange/drivers/amber.py#L103

My personal experience has always been that having AmberTools installed also provides Sander. I've never had issues with LAMMPS or GROMACS installs conflicting

... oh, now I see that the non-RDKit builds forcefully remove AmberTools. 🤦 That'll explain at least two of the three errors in the matrix.

@mattwthompson
Copy link
Member Author

Does our distribution of examples as a conda package mean we can only have conda-forge-installable packages in our examples? ref conda-forge/openff-toolkit-feedstock#14

@j-wags
Copy link
Member

j-wags commented Nov 2, 2021

Does our distribution of examples as a conda package mean we can only have conda-forge-installable packages in our examples?

Good catch. Not quite. We already have a GROMACS section in the "appendix" of the toolkit_showcase example, which just won't run out of the box without the additional dep. So it'd probably be best to separate the GROMACS-dependent cell of the interchange notebook into an appendix, with instructions on how to install it.

@mattwthompson mattwthompson added this to the 0.10.2 milestone Nov 8, 2021
@mattwthompson
Copy link
Member Author

mattwthompson commented Nov 9, 2021

I'm running out of resources tracking down this behavior; I've gone so far as printing out the files themselves and nothing seems out of order. They pass the eye check. I can copy+paste them into a new folder and run them just fine, both directly and via _run_sander. Running tests on the notebook gives me only passing tests. This is all using the same branch that this PR sees. Downgrading to Python 3.7 does not seem to change anything.

Click to expand!
=================================== FAILURES ===================================
_ examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb::Cell 8 _
Notebook cell execution failed
Cell 8: Cell execution caused an exception

Input:
!cat system.inpcrd
!cat system.prmtop
!cat system.top
!cat system.gro
amber_energies = get_amber_energies(interchange)
amber_energies.energies

Traceback:

---------------------------------------------------------------------------
SanderError                               Traceback (most recent call last)
/tmp/ipykernel_3354/2590401729.py in <module>
      3 get_ipython().system('cat system.top')
      4 get_ipython().system('cat system.gro')
----> 5 amber_energies = get_amber_energies(interchange)
      6 amber_energies.energies

/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/openff/interchange/drivers/amber.py in get_amber_energies(off_sys, writer, electrostatics)
     74                 inpcrd_file="out.inpcrd",
     75                 in_file=in_file,
---> 76                 electrostatics=electrostatics,
     77             )
     78             return report

/usr/share/miniconda3/envs/test/lib/python3.7/site-packages/openff/interchange/drivers/amber.py in _run_sander(inpcrd_file, prmtop_file, in_file, electrostatics)
    136         with open(prmtop_file) as f:
    137             err += f.read()
--> 138         raise SanderError(err)
    139 
    140     energies, _ = _group_energy_terms("mdinfo")

SanderError: double free or corruption (out)

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:
#0  0x7ffb9dde720f in ???
#1  0x7ffb9dde718b in ???
#2  0x7ffb9ddc6858 in ???
#3  0x7ffb9de313ed in ???
#4  0x7ffb9de3947b in ???
#5  0x7ffb9de3b11f in ???
#6  0x556c060d15a2 in ???
#7  0x556c060cd984 in ???
#8  0x556c060cd9fc in ???
#9  0x7ffb9ddc80b2 in ???
#10  0x556c05f03098 in ???
Aborted (core dumped)
Run a single-point energy with bonds containing hydrogen constrained
&cntrl
imin=1,
maxcyc=0,
ntb=1,
ntc=2,
ntf=2,
cut=9.0
/
 &ewald
  order=4
  skinnb=1.0
/

   27  0.0000000e+00
  12.5320000  10.8130000  10.3860000  12.3480000  10.3390000  11.8250000
  10.8800000  10.3650000  12.2440000  10.2560000  11.7390000  12.0200000
  10.4390000  12.2130000  10.5810000  11.9070000  12.1870000  10.1620000
  12.0720000  10.0880000   9.7030000  13.6000000  10.8490000  10.1430000
  12.7450000   9.3240000  11.9320000  12.9300000  10.9820000  12.4970000
  10.3240000   9.6140000  11.6690000  10.7930000  10.0880000  13.3000000
   9.1880000  11.7030000  12.2640000  10.7160000  12.4640000  12.7040000
   9.8580000  11.5710000   9.9090000  10.0430000  13.2300000  10.4740000
  11.9940000  12.4650000   9.1050000  12.4630000  12.9380000  10.7370000
  10.1720000  31.2760000  27.8660000   8.7460000  30.9610000  27.4710000
   8.7520000  30.2640000  26.2340000  10.2040000  31.8150000  28.8180000
  10.7580000  30.3560000  27.9620000  10.6610000  31.8860000  27.0990000
   8.1690000  31.8830000  27.3520000   8.2670000  30.3330000  28.2280000
   7.8260000  30.0790000  26.0110000
  31.8850000  31.8850000  31.8850000  90.0000000  90.0000000  90.0000000
%VERSION  VERSION_STAMP = V0001.000  DATE = 11/09/21  19:30:29
%FLAG TITLE
%FORMAT(20a4)

%FLAG POINTERS
%FORMAT(10I8)
      27       5      18       8      42       7      64      18       0       0
     140       2       8       7      18       4       3      10       1       0
       0       0       0       0       0       0       0       1      27       0
       0       0
%FLAG ATOM_NAME
%FORMAT(20a4)
C1  C2  C3  C4  C5  C6  H1  H2  H3  H4  H5  H6  H7  H8  H9  H10 H11 H12 C7  C8  
O1  H13 H14 H15 H16 H17 H18 
%FLAG CHARGE
%FORMAT(5E16.8)
 -1.39218372E+00 -1.39218372E+00 -1.39218372E+00 -1.39218372E+00 -1.39218372E+00
 -1.39218372E+00  6.96091860E-01  6.96091860E-01  6.96091860E-01  6.96091860E-01
  6.96091860E-01  6.96091860E-01  6.96091860E-01  6.96091860E-01  6.96091860E-01
  6.96091860E-01  6.96091860E-01  6.96091860E-01 -2.48005705E+00  2.30329670E+00
 -1.09297376E+01  7.72022159E-01  7.72022159E-01  7.72022159E-01  7.87201335E-01
  7.87201335E-01  7.21602878E+00
%FLAG ATOMIC_NUMBER
%FORMAT(10I8)
       6       6       6       6       6       6       1       1       1       1
       1       1       1       1       1       1       1       1       6       6
       8       1       1       1       1       1       1
%FLAG MASS
%FORMAT(5E16.8)
  1.20107800E+01  1.20107800E+01  1.20107800E+01  1.20107800E+01  1.20107800E+01
  1.20107800E+01  1.00794700E+00  1.00794700E+00  1.00794700E+00  1.00794700E+00
  1.00794700E+00  1.00794700E+00  1.00794700E+00  1.00794700E+00  1.00794700E+00
  1.00794700E+00  1.00794700E+00  1.00794700E+00  1.20107800E+01  1.20107800E+01
  1.59994300E+01  1.00794700E+00  1.00794700E+00  1.00794700E+00  1.00794700E+00
  1.00794700E+00  1.00794700E+00
%FLAG ATOM_TYPE_INDEX
%FORMAT(10I8)
       1       1       1       1       1       1       2       2       2       2
       2       2       2       2       2       2       2       2       1       1
       3       2       2       2       4       4       5
%FLAG NUMBER_EXCLUDED_ATOMS
%FORMAT(10I8)
      15      14      13      12      11      10       5       4       3       2
       3       2       3       2       3       2       1       1       8       7
       6       4       3       2       2       1       1
%FLAG NONBONDED_PARM_INDEX
%FORMAT(10I8)
       1       2       4       7      11       2       3       5       8      12
       4       5       6       9      13       7       8       9      10      14
      11      12      13      14      15
%FLAG RESIDUE_LABEL
%FORMAT(20a4)

%FLAG RESIDUE_POINTER
%FORMAT(10I8)
       1
%FLAG BOND_FORCE_CONSTANT
%FORMAT(5E16.8)
  2.64621486E+02  3.70046707E+02  3.29969981E+02  5.43526783E+02
%FLAG BOND_EQUIL_VALUE
%FORMAT(5E16.8)
  1.52190126E+00  1.09389949E+00  1.42734396E+00  9.71676331E-01
%FLAG ANGLE_FORCE_CONSTANT
%FORMAT(5E16.8)
  5.32053163E+01  4.87764926E+01  6.50906161E+01
%FLAG ANGLE_EQUIL_VALUE
%FORMAT(5E16.8)
  2.03413912E+00  2.01765472E+00  1.92603856E+00
%FLAG DIHEDRAL_FORCE_CONSTANT
%FORMAT(5E16.8)
  9.22387404E-02  3.15993592E-01  3.24779681E-01  1.04066385E-01  1.91192672E-01
  3.44538215E-01  1.36455637E-01  1.11552567E-01  3.43249022E-01  3.02639017E-01
%FLAG DIHEDRAL_PERIODICITY
%FORMAT(5E16.8)
  3.00000000E+00  2.00000000E+00  1.00000000E+00  3.00000000E+00  3.00000000E+00
  3.00000000E+00  1.00000000E+00  3.00000000E+00  1.00000000E+00  3.00000000E+00
%FLAG DIHEDRAL_PHASE
%FORMAT(5E16.8)
  0.00000000E+00  3.14159265E+00  3.14159265E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
%FLAG SCEE_SCALE_FACTOR
%FORMAT(5E16.8)
  1.20000000E+00  1.20000000E+00  1.20000000E+00  1.20000000E+00  1.20000000E+00
  1.20000000E+00  1.20000000E+00  1.20000000E+00  1.20000000E+00  1.20000000E+00
%FLAG SCNB_SCALE_FACTOR
%FORMAT(5E16.8)
  2.00000000E+00  2.00000000E+00  2.00000000E+00  2.00000000E+00  2.00000000E+00
  2.00000000E+00  2.00000000E+00  2.00000000E+00  2.00000000E+00  2.00000000E+00
%FLAG SOLTY
%FORMAT(5E16.8)
  0.00000000E+00
%FLAG LENNARD_JONES_ACOEF
%FORMAT(5E16.8)
  9.66338652E+05  9.24328843E+04  7.38518138E+03  6.66507729E+05  5.83759564E+04
  4.40259018E+05  8.33691908E+04  6.54768129E+03  5.22131072E+04  5.79557957E+03
  1.46234885E+01  4.58964736E-01  5.90854038E+00  3.70489465E-01  2.68310183E-08
%FLAG LENNARD_JONES_BCOEF
%FORMAT(5E16.8)
  6.48619732E+02  1.23783906E+02  2.15902147E+01  6.34472236E+02  1.15865057E+02
  6.07363521E+02  1.18714205E+02  2.05290621E+01  1.10655807E+02  1.95039576E+01
  2.60290771E-01  2.84543313E-02  1.94875807E-01  2.58163965E-02  1.15016368E-06
%FLAG BONDS_INC_HYDROGEN
%FORMAT(10I8)
       0      18       2       0      21       2       3      24       2       3
      27       2       6      30       2       6      33       2       9      36
       2       9      39       2      12      42       2      12      45       2
      15      48       2      15      51       2      54      63       2      54
      66       2      54      69       2      57      72       2      57      75
       2      60      78       4
%FLAG BONDS_WITHOUT_HYDROGEN
%FORMAT(10I8)
       0       3       1       0      15       1       3       6       1       6
       9       1       9      12       1      12      15       1      54      57
       1      57      60       3
%FLAG ANGLES_INC_HYDROGEN
%FORMAT(10I8)
       0       3      24       1       0       3      27       1       0      15
      48       1       0      15      51       1       3       0      18       1
       3       0      21       1       3       6      30       1       3       6
      33       1       6       3      24       1       6       3      27       1
       6       9      36       1       6       9      39       1       9       6
      30       1       9       6      33       1       9      12      42       1
       9      12      45       1      12       9      36       1      12       9
      39       1      12      15      48       1      12      15      51       1
      15       0      18       1      15       0      21       1      15      12
      42       1      15      12      45       1      18       0      21       2
      24       3      27       2      30       6      33       2      36       9
      39       2      42      12      45       2      48      15      51       2
      54      57      72       1      54      57      75       1      57      54
      63       1      57      54      66       1      57      54      69       1
      57      60      78       3      60      57      72       1      60      57
      75       1      63      54      66       2      63      54      69       2
      66      54      69       2      72      57      75       2
%FLAG ANGLES_WITHOUT_HYDROGEN
%FORMAT(10I8)
       0       3       6       1       0      15      12       1       3       0
      15       1       3       6       9       1       6       9      12       1
       9      12      15       1      54      57      60       1
%FLAG DIHEDRALS_INC_HYDROGEN
%FORMAT(10I8)
       0       3       6      30       4       0       3       6      33       4
       0      15      12      42       4       0      15      12      45       4
       3       0      15      48       4       3       0      15      51       4
       3       6       9      36       4       3       6       9      39       4
      18       0       3       6       4      21       0       3       6       4
       6       9      12      42       4       6       9      12      45       4
       9       6       3      24       4       9       6       3      27       4
       9      12      15      48       4       9      12      15      51       4
      12       9       6      30       4      12       9       6      33       4
      18       0      15      12       4      21       0      15      12       4
      15       0       3      24       4      15       0       3      27       4
      15      12       9      36       4      15      12       9      39       4
      18       0       3      24       5      18       0       3      27       5
      18       0      15      48       5      18       0      15      51       5
      21       0       3      24       5      21       0       3      27       5
      21       0      15      48       5      21       0      15      51       5
      24       3       6      30       5      24       3       6      33       5
      27       3       6      30       5      27       3       6      33       5
      30       6       9      36       5      30       6       9      39       5
      33       6       9      36       5      33       6       9      39       5
      36       9      12      42       5      36       9      12      45       5
      39       9      12      42       5      39       9      12      45       5
      42      12      15      48       5      42      12      15      51       5
      45      12      15      48       5      45      12      15      51       5
      54      57      60      78       6      54      57     -60      78       7
      60      57      54      63       8      60      57     -54      63       9
      60      57      54      66       8      60      57     -54      66       9
      60      57      54      69       8      60      57     -54      69       9
      63      54      57      72       5      63      54      57      75       5
      66      54      57      72       5      66      54      57      75       5
      69      54      57      72       5      69      54      57      75       5
      72      57      60      78      10      75      57      60      78      10
%FLAG DIHEDRALS_WITHOUT_HYDROGEN
%FORMAT(10I8)
       0       3       6       9       1       0       3      -6       9       2
       0       3      -6       9       3       0      15     -12       9       1
       0      15     -12       9       2       0      15     -12       9       3
       3       0      15      12       1       3       0     -15      12       2
       3       0     -15      12       3       3       6      -9      12       1
       3       6      -9      12       2       3       6      -9      12       3
      15       0       3       6       1      15       0      -3       6       2
      15       0      -3       6       3       6       9     -12      15       1
       6       9     -12      15       2       6       9     -12      15       3
%FLAG EXCLUDED_ATOMS_LIST
%FORMAT(10I8)
       2       6       7       8       3       4      11      12       9      10
       5      15      16      17      18       3       9      10       6       5
      17      18       7       8       4      13      14      11      12       6
       7       8       4      11      12       9      10       5      15      16
      13      14       9      10       5      13      14      11      12       6
      17      18      15      16      11      12       6      15      16      13
      14       7       8      17      18      13      14      17      18      15
      16       9      10       7       8       9      10      17      18       8
       9      10      17      18      11      12      10      11      12      13
      14      12      13      14      15      16      14      15      16      17
      18      16      17      18      18       0      20      22      23      24
      21      27      25      26      21      25      26      22      23      24
      27      22      23      24      27      25      26      25      26      23
      24      25      26      24      25      26      27      26      27       0
%FLAG HBOND_ACOEF
%FORMAT(5E16.8)

%FLAG HBOND_BCOEF
%FORMAT(5E16.8)

%FLAG HBCUT
%FORMAT(5E16.8)

%FLAG AMBER_ATOM_TYPE
%FORMAT(20a4)
C1  C2  C3  C4  C5  C6  H1  H2  H3  H4  H5  H6  H7  H8  H9  H10 H11 H12 C7  C8  
O1  H13 H14 H15 H16 H17 H18 
%FLAG TREE_CHAIN_CLASSIFICATION
%FORMAT(20a4)
BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA 
BLA BLA BLA BLA BLA BLA BLA 
%FLAG JOIN_ARRAY
%FORMAT(10I8)
       0       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0
%FLAG IROTAT
%FORMAT(10I8)
       0       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0       0       0       0
       0       0       0       0       0       0       0
%FLAG SOLVENT_POINTERS
%FORMAT(3I8)
       1       1       2
%FLAG ATOMS_PER_MOLECULE
%FORMAT(10I8)
      27
%FLAG BOX_DIMENSIONS
%FORMAT(5E16.8)
  9.00000000E+01  3.18850000E+01  3.18850000E+01  3.18850000E+01
%FLAG RADIUS_SET
%FORMAT(1a80)
0
%FLAG RADII
%FORMAT(5E16.8)
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00
%FLAG SCREEN
%FORMAT(5E16.8)
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00  0.00000000E+00
  0.00000000E+00  0.00000000E+00
%FLAG IPOL
%FORMAT(1I8)
       0


=========================== short test summary info ============================
FAILED examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb::Cell 8
======================== 1 failed, 21 passed in 16.44s =========================

@mattwthompson
Copy link
Member Author

Nothing stands out to me in the AmberTools changelog: https://ambermd.org/ATPatches.php

@j-wags
Copy link
Member

j-wags commented Nov 10, 2021

Here are some possibilities I can think of:

  • a filesystem/file buffer issue? Like, maybe the amber inputs aren't fully written before sander tries to load them, and the rdkit/ubuntu configuration already has the file system under heavy load?
  • a newly-discovered conflict with rdkit, gromacs, or lammps? I went looking through previous CI runs on this PR but couldn't find one that got far enough (edit: without LAMMPS+GROMACS) to trigger this sander error
  • something something trying pinning to an older ambertools?

@mattwthompson
Copy link
Member Author

Lily suggested running the notebook as a script - with a couple steps (jupyter nbconvert --to script export_with_interchange.ipynb and pointing to the PDB file in a safer way) I got it online. Still working locally

(openff-dev) [openforcefield] pytest -q openff/toolkit/tests/test_examples.py                   drop-parmed-examples  ✱
...                                                                                                              [100%]
3 passed in 31.94s
(openff-dev) [openforcefield] python -m pytest -q examples/using_smirnoff_in_amber_or_gromacs/export_with_interchange.ipynb --nbval-lax -p no:randomly --current-env
.............                                                                                                    [100%]
13 passed in 13.66s

If it fails in CI as a script, there is something wrong with the actual code and I'll need to revisit how I'm using subprocesses. If not, there is something funky happening with the notebook and/or how it's called from pytest.

@lilyminium
Copy link
Collaborator

lilyminium commented Nov 10, 2021

So it looks like the script passes with ambertools on Mac, but not Ubuntu. I took the liberty of restarting the jobs to see if this would happen again; if so, it implies there's something up with the code and the Jupyter format. Or possibly it's all pytest acting up and not freeing memory properly, although if the CI passes with sander calls then that's probably not it.

Ubuntu ambertools (failing): ambertools 21.11 py39hc630cb1_0 conda-forge
Mac ambertools (successful): ambertools 21.11 py39hf80593e_0 conda-forge

@mattwthompson
Copy link
Member Author

Thanks again for helping with this. The way I call other programs is relatively naive, but it's pretty boilerplate and hasn't given me much trouble in the past:

https://github.com/openforcefield/openff-interchange/blob/33a5e3a0b3009c10beab1884ff6ee58aca3e6453/openff/interchange/drivers/amber.py#L170-L178

The system is small (two molecules) so hardware limits shouldn't be the issue. Memory leaking at some point in the process (an executable starting tests, which calls something else to run the notebook, which then further spawns a new subprocess) sounds totally plausible, if hard to hunt down. I'm updating an old Linux box to see if I can reproduce it locally. Some obscure OS difference would explain why it works for me locally (normally using macOS) but fails on CI.

@mattwthompson
Copy link
Member Author

I can reproduce this on an machine running Linux, and one fix is to remove the box information from the coordinate file. I'll need to gather information on if people want box information in both the coordinate and topology file.

Comment on lines +104 to +105
pip install git+https://github.com/openforcefield/openff-interchange.git@skip-drivers

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be explicit: I will include this branch into a release before aiming to have this PR merged

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now included in v0.1.3; CI will need to be restarted next week to get it to pass (the package will not be online until after hours)

@mattwthompson
Copy link
Member Author

The issue, or at least what I fixed locally to get it working, is this: openforcefield/openff-interchange@6e4fd12

@mattwthompson
Copy link
Member Author

Failures in last run are codecov.

@mattwthompson mattwthompson merged commit 4f81d41 into master Nov 16, 2021
@mattwthompson mattwthompson deleted the drop-parmed-examples branch November 16, 2021 18:03
mattwthompson added a commit that referenced this pull request Dec 3, 2021
…nal dependencies (#1142)

* Add openff-units to test environments

* Make OpenMM optional in most of topology and typing modules

* More fixes in Molecule

* Improve parsing of SMIRNOFF XML source

* More fixes for force field tests

* Test against openff-units/smirnoff-per-mol

* Fix energy tests

* Patch some unit interoperability in utils/utils.py

* Fixes for charge assignment tests

* Let some Molecule setters take in openmm.unit quantities

* [pre-commit.ci] pre-commit autoupdate (#1119)

updates:
- [github.com/psf/black: 21.9b0 → 21.10b0](psf/black@21.9b0...21.10b0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Bump actions/checkout from 2.3.5 to 2.4.0 (#1121)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2.3.5...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add 404 page to docs (#1115)

* Add 404 page

* Use sphinx-notfound-page in RTD but skip building the 404 page if not installed

* Improve language in 404

* Add link to stable version on 404 page

* Relocate the SMIRNOFF spec to standards (#949)

* Relocate the SMIRNOFF spec to standards

* Update links to SMIRNOFF spec in standards

* Update links in release history

Co-authored-by: Matthew W. Thompson <mattwthompson@protonmail.com>
Co-authored-by: Josh Mitchell <yoshanuikabundi@gmail.com>
Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>

* [pre-commit.ci] pre-commit autoupdate (#1124)

updates:
- [github.com/PyCQA/isort: 5.9.3 → 5.10.0](PyCQA/isort@5.9.3...5.10.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Use pytest-rerunfailures on tests that rely on QCArchive (#1116)

* Use pytest-rerunfailures on tests that rely on QCArchive

* Update openff/toolkit/tests/test_molecule.py

Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>

Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>

* [pre-commit.ci] pre-commit autoupdate (#1127)

updates:
- [github.com/PyCQA/isort: 5.10.0 → 5.10.1](PyCQA/isort@5.10.0...5.10.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Make FrozenMolecule.to_hill_formula a class method (#1120)

* Make FrozenMolecule.to_hill_formula a class method

* Skip Hill formula short-circuit in isomorphism check

* Remove debug code

* Support some amount of duck-typing in isomorphism check

* Fix typo in test

* Fix type annotation

* Add automated tests against OpenMM/OpenEye RCs (#1111)

* Add automated tests against OpenMM/OpenEye RCs

* Rework to unconditionally test against all RC/beta builds

* Run on push

* Fix syntax

* Make OE RC higher priority than OE beta

* Remove dev code

* Update beta_rc.yaml

* Use strict channel priority

* Switch back to debug

* Remove dev trigger

* Drop OpenEye beta channel

* Replace ParmEd with Interchange in Amber/GROMACS example (#1113)

* Add Interchange + GROMACS to existing GROMACS example

* Overhaul Amber + GROMACS example

* Update conda env used by binder

* Refactor protein-ligand examples to not use ParmEd

* Add back ParmEd-based example

* Fix other files

* Rename notebooks

* Add header notes to each notebook

* add new example deps to example yaml

* Skip Interchange example when AmberTools is not installed

* Do not assume LAMMPS and GROMACS are installed

* Fix how GROMACS/Amber notebook is detected

* Debug files

* Move debug so it might get printed

* Split out Amber/GROMACS example into earlier step

* Run examples with Python 3.9

* try not using mamba in case its causing trouble with ambertools

* re enable mamba, force ambertools downgrade

* Try running it as a test script

* Unpin AmberTools

* Revert some debugging in workflow

* Remove script used for debugging

* Pin to interchange v0.1.3+

* Update CHANGELOG

Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>

* Fix examples workflow (#1128)

* Simplify virtual site serialization, fix some tests

* Fix tmp_path usage

* Bump actions/setup-python from 2.2.2 to 2.3.0 (#1131)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.2.2 to 2.3.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v2.2.2...v2.3.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix tmp_path usage (#1130)

* Fix tmp_path usage

* Update release history

* Fixes for topology unit tests

* Fixes for test_molecule

* Fixes for test_toolkits*py

* Fixes for test_utils

* Fix units of virtual site positions

* [pre-commit.ci] pre-commit autoupdate (#1134)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 21.10b0 → 21.11b1](psf/black@21.10b0...21.11b1)
- [github.com/nbQA-dev/nbQA: 1.1.1 → 1.2.1](nbQA-dev/nbQA@1.1.1...1.2.1)

* Have pre-commit.ci run autoupdate monthly

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Matthew W. Thompson <mattwthompson@protonmail.com>

* Fix fstrings for Python 3.7 compatibility

* Fixes for GBSA tests

* Fix test_tip5p_dimer_energy

* Style fixes

* Fixes for some parameter assignment tests

* Install released version of openff-units

* Fix GLOBAL_TOOLKIT_REGISTRY etc being expanded in sigs (#1135)

* Bump actions/setup-python from 2.3.0 to 2.3.1 (#1138)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v2.3.0...v2.3.1)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update examples to use openff-units

* Streamline CI github actions (#1125)

* matrixify CI

* fix list

* Revert "fix list"

This reverts commit 16cad1c.

* redo packages

* check uninstalled toolkits

* tidy up and rm comment

* Fix Mypy

* Remove unused imports

* Update FAQ.md (#1139)

* Update FAQ.md

* Apply suggestions from code review

Co-authored-by: Matt Thompson <mattwthompson@protonmail.com>

* Apply suggestions from code review

Co-authored-by: Josh A. Mitchell <yoshanuikabundi@gmail.com>

* link to core concepts when talking about what an OFFMol needs to know

* fix core concepts link

Co-authored-by: Matt Thompson <mattwthompson@protonmail.com>
Co-authored-by: Josh A. Mitchell <yoshanuikabundi@gmail.com>

* Fix typing tests

* Switch to mendeleev

* Drop simtk support

* Update dependencies

* Mark failing tests as flaky

* More forceful xfail

* Make entire openmm module optional

* Add mendeleev to test envs

* Fix imports

* Fix merge conflict

* Fix imports

* Fix mypy

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Josh A. Mitchell <yoshanuikabundi@gmail.com>
Co-authored-by: SimonBoothroyd <simon.boothroyd@hotmail.com>
Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>
Co-authored-by: Lily Wang <31115101+lilyminium@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants