choderalab / perses

Experiments with expanded ensembles to explore chemical space
http://perses.readthedocs.io
MIT License
178 stars 50 forks source link

[HybridTopologyFactory] `CustomNonbondedForce` cutoff doesn't match `NonBondedForce` #1194

Closed IAlibay closed 10 months ago

IAlibay commented 1 year ago

If two endstate systems are built with a non-1.0 nm cutoff, the HybridTopologyFactory will set the NonBondedForce to that cutoff value, but will leave CustomNonbondedForce to its default value of 1.0.

It's unclear if this is an intended feature or a bug. It looks like RestCapableHybridTopologyFactory does add a cutoff to custom_force, but it would be great to also be able to do this in the base class (if possible).

How to reproduce

A quick way to reproduce is to manually force an 'nonbondedCutoff': 0.9 entry to the SystemGenerator calls in relative_setup.

IAlibay commented 1 year ago

Could I maybe ping this again please? I'm happy to fix this, but I would need to know if it's a feature or a bug.

ijpulidos commented 1 year ago

Apologies for the delayed response, I don't recall this being an intended behavior, will raise this up in the next perses dev meeting. Thanks for bringing this up.

ijpulidos commented 1 year ago

This seems like a bug and we should be setting the _add_nonbonded_force_terms for the HybridTopologyFactory, we should also add a test for this. Thanks for reporting!

ijpulidos commented 10 months ago

closed via #1230