Closed Luthaf closed 6 months ago
Here is a pre-built version of the code in this pull request: wheels.zip, you can install it locally by unzipping wheels.zip
and using pip
to install the file matching your system
Hello, is it possible that these changes are breaking changes with respect to older rascaline versions? I am seeing broken NPT simulations with the newest rascaline version
Old rascaline:
New rascaline:
unwrapped
which simulation engine/driver are you using? The old i-PI driver used for the alchemical HEA project was cancelling the issue fixed here and producing the right gradients overall. But if you use it with the code from this PR then the correction will make it wrong.
Okay, is it off by only a scaling factor with the cell-volume, or is it more that needs to be changed ?
Two things needs to change: the code needs to compute "strain"
gradients instead of "cell"
gradients (the old cell gradients where almost the same as the new strain gradients), and then scale by the volume.
This partially undo #105: we where right to use gradient w.r.t. strain there, but these should be stored using
"strain"
as the gradient parameter.Now, we can have three kinds of gradients:
"positions"
, taken at fixed cell matrix;"cell"
, taken at fixed Cartesian positions;"strain"
, following the definition for the virial.The first two are then used when integrating with Torch's autograd system; and the last one can be useful when computing gradients in forward mode.
As a side effect, I fixed gradients of SOAP when the cell is smaller than the cutoff, we where doing some summations wrong in this case.
📚 Documentation preview 📚: https://rascaline--301.org.readthedocs.build/en/301/