mosdef-hub / foyer

A package for atom-typing as well as applying and disseminating forcefields
https://foyer.mosdef.org
MIT License
117 stars 75 forks source link

Unit tests on more exotic molecules #234

Open mattwthompson opened 5 years ago

mattwthompson commented 5 years ago

While we continue to improve the atomtyping engine, it would be useful to also include more varied chemistries in the unit tests of the core foyer package. For example, while doing #224 @mikemhenry did a simple (local) test on a complex molecule (some conjugated aromatic compound, I think). We should continue with this idea and add more types of molecules - for starters, moieties that individual groups use that not many others are likely to encounter.

I will let @mikemhenry (or somebody else from Eric's lab) start this out.

mikemhenry commented 5 years ago

@chrisjones4 is also interested in this

jennyfothergill commented 4 years ago

We are running into a problem which I think is related to this issue. (I'm using Foyer version 0.7.3.) Trying to type a p3ht molecule:

smiles = 'c1cscc1CCCCCC'
compound = mb.load(smiles, smiles = True)
pmd_molecule = compound.to_parmed()
oplsaa = foyer.forcefields.load_OPLSAA()
typed_oplsaa = oplsaa.apply(pmd_molecule)

will result in FoyerError: Found no types for atom 1 (carbon).

mattwthompson commented 4 years ago

Have you been able to type a ph3t before, using this OPLS-AA file? It's likely that we just haven't added the necessary SMARTS definitions to the file. As far as a starting point, the easiest thing would be having a reference system that's already typed; otherwise we typically start by parsing this file and hoping Jorgensen's tree has a comment that describes the needed atom type(s)

https://github.com/gromacs/gromacs/blob/efc5b167dc3f254ccf8a444b751a223ca1c26034/share/top/oplsaa.ff/atomtypes.atp