forked from JuliaMolSim/Molly.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glue #1
Merged
Merged
Glue #1
Conversation
This file contains 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
…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
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.jl
Note: 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.ipynb
to document the usage of the added interaction typeaccelerations
insrc/forces.jl
: to enable glue calculation before pair contributions to the forcespotential_energy
insrc/analysis.jl
to enable the use of apotential_energy
function for the glue interaction typesrc/loggers.jl
by adding new loggers which proved useful for debugging:GlueDensityLogger
,VelocityLogger
,ForceLogger
Simulation
insrc/types.jl
by addingglue_densities
as an array where per-atom glue values are stored for the glue potentialtest/glue.jl
as 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: