- 
                Notifications
    You must be signed in to change notification settings 
- Fork 62
Added soft-core potentials (Beutler et al. & Gapsys et al.) #222
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
base: master
Are you sure you want to change the base?
Conversation
…xamples.md, test/interactions.jl
…MD, reversed lambda scaling in function
| Codecov Report❌ Patch coverage is  
 Additional details and impacted files@@            Coverage Diff             @@
##           master     #222      +/-   ##
==========================================
+ Coverage   58.43%   58.84%   +0.41%     
==========================================
  Files          42       42              
  Lines        8223     8296      +73     
==========================================
+ Hits         4805     4882      +77     
+ Misses       3418     3414       -4     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, just a few small comments.
        
          
                src/interactions/lennard_jones.jl
              
                Outdated
          
        
      | R = inter.α*sqrt(cbrt(((26/7)*(C12/C6)*(1-inter.λ)))) | ||
| invR = 1/R | ||
| if r >= R | ||
| return (((12*C12)/r^13)-((6*C6)/r^7)) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To save computation you can set r6 = r^6 then use r6 * r and r6 * r6 * r as appropriate. This also applies elsewhere.
        
          
                src/types.jl
              
                Outdated
          
        
      | end | ||
|  | ||
| """ | ||
| Atom_L(; <keyword arguments>) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now don't add this to Molly, as we may decide to have lambda in the main atom type.
        
          
                src/cutoffs.jl
              
                Outdated
          
        
      | ShiftedForceCutoff, | ||
| CubicSplineCutoff | ||
| CubicSplineCutoff, | ||
| force_cutoff | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't export, you can access with Molly.force_cutoff or using Molly: force_cutoff.
        
          
                src/interactions/coulomb.jl
              
                Outdated
          
        
      | CoulombSoftCoreBeutler(; cutoff, α, λ, use_neighbors, σ_mixing, weight_special, coulomb_const) | ||
| The Coulomb electrostatic interaction between two atoms with a soft core. | ||
| The Coulomb electrostatic interaction between two atoms with a soft core, used for appearing and disappearing of atoms based on the potential described in Beutler et al. 1994 (Chem. Phys. Lett.). | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the DOI of the paper, like in src/simulators.jl line 358. Also link where it is mentioned in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, click merge (if the button isn't available, let me know and I can do it).
I have added four functions of which two replace the previous soft-core potentials (LennardJonesSoftCore and CoulombSoftCore).
Important note: These interactions are for appearing and disappearing atoms only, not for transformations between different atoms (e.g. a alchemical transformation from carbon to hydrogen atom).