Skip to content
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

Negatively charged nitrogen parameterisation #347

Closed
noahharrison64 opened this issue Sep 30, 2024 · 5 comments · Fixed by #361
Closed

Negatively charged nitrogen parameterisation #347

noahharrison64 opened this issue Sep 30, 2024 · 5 comments · Fixed by #361

Comments

@noahharrison64
Copy link

noahharrison64 commented Sep 30, 2024

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
Copy link
Contributor

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
Copy link
Author

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

@noahharrison64
Copy link
Author

Hi @lohedges,

I'm wondering if there any plans for future releases to include parameterisation arguments that can be parsed to antechamber?

The patch I'm using to include the '-dr no' flag is working fine but I feel like more flexible functionality could be a useful feature and makes staying up to date with latest BSS releases easier (for me personally, so I don't have to keep re-patching)

Cheers,
Noah

@lohedges
Copy link
Contributor

Can do. We already have support for **kwargs in all the parameterisation functions, so could just add one (hidden) to do what you want. Could use something like acdoctor=False to add the -dr no flag. Would this work for you?

@noahharrison64
Copy link
Author

That'd be perfect, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants