Comments (6)
Hi there,
The gradients of thermodynamic properties are determined in npt.py
. After the simulation is finished, ForceBalance writes out a parameter file with perturbed parameters (i.e. one of the mvals is changed by finite_difference_h) and recalculates the potential for every simulation snapshot, thus getting the energy derivative by finite difference (i.e. dE/dp = [E(p+h)-E(p)]/h. dE/dp is then contracted with the property to get the derivative, like this: d(rho)/dp = -Beta*[<dE/dp rho> - <dE/dp>*<rho.> ].
The main point here is that ForceBalance is mostly agnostic to the physical meaning of the parameter. If changing the parameter affects the potential energy, then ForceBalance should be able to calculate a property derivative from that. I would start troubleshooting by testing whether changing the c6, c8, c10, c12 parameters in the force field file actually affects the energies of your water box. It's possible these parameters are not being used in the simulation for example.
Thanks,
- Lee-Ping
from forcebalance.
Thank you very much for your prompt response and the great explanation.
I tried printing out the energy derivatives in npt.py and I obviously got 0.0
, however, by printing out the positions from the State, I noticed this all belongs to the gas phase which in my case, it totally makes sense for C12 not to make any effect on the potential energy of the system. C12 is basically for the repulsive term in LJ (C12/r12) and since Hydrogen's C12 is set to 0 and there is only one Oxygen in the gas system, it wouldn't have any effect on the energy. Is there a way to tell ForceBalance to use the liquid phase for energy derivatives?
from forcebalance.
from forcebalance.
from forcebalance.
Thank you very much for your response.
My assumption about the issue with writing the XML file was invalid. The variable name was a bit misleading, it's actually the position of the XML element in the Tree not the "line number" which should be consistent for any XML formatting.
Finally, I figured it out. I had not implemented the copyParametersToContext
method properly in my OpenMM code, hence it wasn't able to update the parameters. I'm still surprised that initializing parameters in OpenMM happens in a separate routine versus updating them (duplicate code).
from forcebalance.
Apologies for opening an old issue, I'm also interested in calculating gradients w.r.t force field parameters for thermodynamic integration.
Please may I ask. Does ForceBalance still calculate the gradient as described here?
Would the getEnergyParameterDerivatives function in OpenMM work for this purpose or are there disadvantages to this?
I would be interested in any input on this.
Thanks,
Alex
from forcebalance.
Related Issues (20)
- AttributeError: 'ForceField' object has no attribute '_forces' HOT 1
- Manual Suggestions HOT 6
- Close files after opening in Molecule HOT 2
- use_pvals option fails to work due to non-conversion to numpy array HOT 1
- Self-polarization correction does not work with Liquid_SMIRNOFF
- Liquid.pdb: Sizes detected: {3, 6} and the PBC
- Forcebalance fails to read some xyz files containing coordinates in scientific notation HOT 2
- Large values with Hessian target HOT 3
- (not urgent) single parameter optimization with workers fails HOT 1
- Compatibility with OpenMM-7.7.0 HOT 4
- I/O error when parsing Tinker Output HOT 3
- Computing FD gradient of angle with OpenMM 7.7.0
- Pymbar 4 compatibility HOT 3
- use openff-units for conversion factors (not urgent) HOT 2
- ForceBalance takes really long to complete HOT 2
- evaluator unit bug
- TypeError with ForceBalance-1.9.4 HOT 17
- runcuda.sh overwrites environment variables HOT 3
- Unexpected keyword argument 'return_topology' HOT 2
- ForceBalance is taking very long time over 1 day HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forcebalance.