OpenBioSim / biosimspace

An interoperable Python framework for biomolecular simulation.
https://biosimspace.openbiosim.org
GNU General Public License v3.0
72 stars 11 forks source link

Negatively charged nitrogen parameterisation #347

Open noahharrison64 opened 3 days ago

noahharrison64 commented 3 days ago

Hi,

I've been encountering an issue with antechamber recently - it seems like it really doesn't like negatively charged nitrogens. Here is an example molecule in SDF format. This is a simplified version since I can't share the structures I'm working with.

Antechamber error:

antechamber: Fatal Error! Weird atomic valence (2) for atom (ID: 40, Name: N8). Possible open valence.

Is there anyway for me to continue using the interface BSS provides to antechamber while ignoring this valence error? I see it's possible to use the -dr no flag, which I assume avoids running the valence checks (although i'm struggling to find documentation for this) but I'm not sure if there's a way to add this to the command that BSS generates. I feel like if the molecule is 'sanitised' by BSS/rdkit then we don't necessarily need to worry about antechamber running its own valence checks, perhaps.

I've also been looking into using OpenFF instead of gaff2 but their documentation seems to suggest you should use the 'constrained' forcefield for any MD over 1fs timesteps. Since I'm using a timestep of 3fs I suppose I should avoid using the openff forcefields implemented via BSS? Are there any plans to include the constrained forcefields in the future?

Thanks, Noah

lohedges commented 3 days ago

Hmm, the antechamber issue is strange. I'll take a read up to see if there's anything we can do.

For the OpenFF question, the "constrained" versions have holonomic constraints that are part of the force field itself. We don't yet parse these, but could do in future. As far as I understand there's no issue using standard constraints as defined by an MD engine, e.g. h-bond constraints, to allow use of larger time steps with the regular force field. (The constrained forcefields make sense when using OpenFF directly when you would likely directly create an OpenMM system to run dynamics with.) For > 2fs time steps you'll probably want to look using hydrogen mass repartitioning too, which BioSimSpace can do for you.

noahharrison64 commented 2 days ago

Hey @lohedges

Thanks for the reply! I'll have a go at patching the _amber.py file in the meantime so that it includes the -dr no flag. This means that 'acdoctor' mode isn't activated. Again, I'd hope any issues with the input files are caught before being provided to antechamber in my use cases so it shouldn't be an issue.

I guess my hesitancy is that the unconstrained forcefields will have been parameterised without MD constraints, and then using constraints would go against the ethos of ensuring simulation parameters are equivalent to those that were used in the forcefield development. Having said that, I don't follow that rule hard and forced anyway, so I'll just give it a whirl and run some backtests. I think as OpenFF becomes more popular and the protein forcefields start getting deployed it'd be great to have the standard, constrained forcefields implemented too!

Cheers, Noah