-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overide API #74
Comments
I'm guessing this is the atom that Foyer is finding multiple types for. Determining which atom types get precedence (and thus which overrides you need) when an atom is part of multiple functional groups gets a bit tricky. In this case, however, my opinion would be that 'opls_713' should override 'opls_139'. This is something you would need to change in |
I wasn't sure if there was a way to do this without editing the |
I don't think you can manually add overrides to a Forcefield object as this is intended to all be handled within the XML file. |
Yeah as @summeraz said, the intention is to have this contained in the xml file. We could think about implementing an interactive prompt for resolving overrides when you're creating a new forcefield but at the end of the day all the logic is intended to be captured in the file itself. |
I'm working on using Foyer to generate a forcefield file for PCBM. Since I'm using an all atom model, I want to use the OPLSAA forcefield file built into foyer:
pdb_path = get_fn("/Users/mikehenry/Downloads/PCBM.pdb")
untyped_pcbm = pmd.load_file(pdb_path, structure=True)
oplsaa = Forcefield(name='oplsaa')
pcbm = oplsaa.apply(untyped_pcbm)
I get an error when I apply the forcefield:
FoyerError: Found multiple types for atom 2 (carbon): ['opls_139', 'opls_713']
In order to fix this I need to do some overrides, but I'm not sure if there is a way to do that on
oplsaa
just with code, or if I need to modify theoplsaa.xml
file.The text was updated successfully, but these errors were encountered: