Hi all,
Is it possible to report or access the value of a subset of the potential energy function, dihedrals for example?
I tried a couple of things - The PeriodicTorsionForce or CustomTorsionForce dont have a getPE (?) method, and the reporter functions only have total potentialEnergy.
This value is useful for calculating the boost energy used in dual accelerated MD.
Thanks
Reporting subsets of the potential energy (i.e. dihedrals)
- lewis martin
- Posts: 63
- Joined: Tue Mar 06, 2018 8:56 pm
- Peter Eastman
- Posts: 2546
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Reporting subsets of the potential energy (i.e. dihedrals)
You can do this by putting each force into its own force group. For example,
Then when you call getState() on the Context, you can specify to include just that force group:
Code: Select all
torsions.setForceGroup(1)
Code: Select all
print(context.getState(getEnergy=True, groups={1}).getPotentialEnergy()
- lewis martin
- Posts: 63
- Joined: Tue Mar 06, 2018 8:56 pm