Glue#1
Merged
Merged
Conversation
…on of glue forces using the general_inters loop
…ivates with FordwardDiff.derivate to re-use the non-derivative forms also used to successfully test ground state energies
…s-Sinclair 1984 empirical model
…o the core components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Glue
Main Change
src/interaction/glue_fs.jlNote: The "glue" is a scalar pre-computed for each atom and is a required quantity to compute energies and forces. So simply iterating over atom pairs to compute energy and force contributions is insufficient, without having pre-computed the glue values. Hence, in a few places, the MD code needed to be adjusted to allow for this extra step.
Minor Changes
fs.ipynbto document the usage of the added interaction typeaccelerationsinsrc/forces.jl: to enable glue calculation before pair contributions to the forcespotential_energyinsrc/analysis.jlto enable the use of apotential_energyfunction for the glue interaction typesrc/loggers.jlby adding new loggers which proved useful for debugging:GlueDensityLogger,VelocityLogger,ForceLoggerSimulationinsrc/types.jlby addingglue_densitiesas an array where per-atom glue values are stored for the glue potentialtest/glue.jlas a new test to run to verify the correctness of the predicitons of potential energies, forces using reference values from the Finnis and Sinclair paper linked above as well as testing the behavior of the glue scalar values.Note: A peculiarity of the Finnis-Sinclair potential is that the potential energy of an atom depends on the scalar glue value of that atom by taking the square root. Hence, cases in which the glue value, for whatever reason, becomes negative, will crash a simulation, since it is not defined in the model how to handle complex potential energy values.
To dos
There are probably more things to be done. The immediately relevant steps would be to: