Comments (13)
This isn't an issue with the Foyer code itself, rather that there are 6 dihedrals found in the molecule that haven't been found in the forcefield xml file. I.e., they need to be defined by haven't yet.
I'll note that in some cases you may have quartets that don't require dihedral parameters (especially for CHARMM as the dihedral parameters are corrections to the 1-4 interactions not a replacement). If that is the case, then you'd just want to modify your apply call to tell it to ignore this (i.e., raise a warning, but not throw an error):
typed_gly = charmm.apply(gly,verbose=True, assert_dihedral_params=False)
Bonds, angles, dihedrals, and impropers each have an associated assert flag that can be set (i.e., assert_bond_params, assert_angle_params, assert_dihedral_params, assert_improper_params). This is especially useful as, e.g., a CG forcefield might not need to define dihedral or angle parameters or one might use fictitious bonds in mbuild to orient building blocks in the system, but not want them to be actually chemically bound. See the documentation about this
I'm going to close this issue as it appears the code is functioning as expected, but send me a message if you have more questions.
from foyer.
@chrisiacovella I think there is more going on here than meets the eye. All of the missing dihedrals seem to be found in the forcefield. Additionally, the atomtyping works using the GMSO methodology:
from forcefield_utilities import FoyerFFs
loader = FoyerFFs()
gmso_ff = loader.load('ffs/charmm_foyer/glycine.xml').to_gmso_ff()
from gmso.parameterization import apply
from gmso.external.convert_mbuild import from_mbuild
gmso_top = from_mbuild(gly) #object created using above recipe
apply(gmso_top, gmso_ff, identify_connections=True)
print(gmso_top.is_typed)
Since this seems to work properly, there seems to be something more than just missing parameters causing the openmm issues seen here. I can spend a little bit of time better showing the dihedrals in the forcefield, and the identities of the missing dihedrals.
from foyer.
I checked this XML manually and the dihedral is actually there (for example: <Proper class1="O" class2="C" class3="CT2" class4="NH1" periodicity1="1" phase1="0.0" k1="0.0" />
), but was just not being found. This might be on the foyer side (or our use of openmm/parmed).
from foyer.
from foyer.
Heres the xml for this molecule
from foyer.
I added the line to the PeriodicTorsionForce and it still errors out with a missing dihedral
Proper class1="" class2="" class3="" class4="" periodicity1="1" phase1="0" k1="0"
from foyer.
Ah I was too quick in closing. So this is a ParmEd issue we have run into in the past. If the dihedral has all the phase parameters set to 0 (i.e., it doesn't modify anything), ParmEd ignores them. The check_dihedrals function does not ignore them and throws an error.
from foyer.
I added phase1="3.141592653589793" to all the ones with k1=0 and this error is the same as before, so I'm not sure this is the issue, provided this is what you meant
from foyer.
regardless of what you set phase1 to be if k1 is hero it doesn't modify it in anyway, so ParmEd ignores it.
from foyer.
OK, yeah it works if I change K=1 to K=0.0000000001 for ones with only 1 K-value
from foyer.
@chrisiacovella good call !!!
from foyer.
See the file for K=1 to K=0.0000000001 for ones with only 1 K-value
glycine_mod_ks_to_near_0_values.txt
from foyer.
This solution seems to work so I am closing this issue
from foyer.
Related Issues (20)
- Edge case when scaling factors are 0 HOT 1
- Getting an error when using Porebuilder and foyer/mbuild, maybe in the box vectors. HOT 1
- Windows built is failing HOT 1
- Parametrized structure has non-zero charge. HOT 1
- ParmEd residue matching assumes ordered residues
- Atom typing triangular water fails HOT 3
- Improper dihedral coefficients in oplsaa.xml HOT 7
- The General Forcefield will not work with GMSO dev branch. HOT 1
- Foyer not working when installed using `conda` but works with `mamba` HOT 4
- deep copy in nbfix doesn't preserve all structure attributes
- CI stops running because tests are using too much memory. #1090
- Update Github action
- Failed Docker build HOT 1
- Error when foyer is imported HOT 9
- Failing CI tests on main
- Question on Retaining Manual Atomtype Modifications Post apply Method in Foyer HOT 2
- Sigma value for alcohol hydrogen in OPLSAA xml HOT 1
- Contradictory info about supported versions of Python HOT 4
- Quickstart example fails HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foyer.