JuliaMolSim / Molly.jl

Molecular simulation in Julia
Other
394 stars 53 forks source link

add FENE bond and cosine angle. #74

Closed ehsanirani closed 2 years ago

ehsanirani commented 2 years ago

Hi. Here I provided a small piece of code to add FENE bond (following Kremer, Grest J. Chem. Phys. 92, 5057 (1990)) and the cosine angle potential to it. These are very common interactions for modeling chromatin or many other polymeric systems. I tried to follow the code-style used in Molly and also provided relevant equations in the docs. Please let me know if I missed something. Hope this small piece of code is useful for others.

New files:

codecov[bot] commented 2 years ago

Codecov Report

Merging #74 (39d51f0) into master (3b5d2b1) will increase coverage by 0.10%. The diff coverage is 93.61%.

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
+ Coverage   86.79%   86.89%   +0.10%     
==========================================
  Files          28       30       +2     
  Lines        3052     3099      +47     
==========================================
+ Hits         2649     2693      +44     
- Misses        403      406       +3     
Impacted Files Coverage Δ
src/Molly.jl 100.00% <ø> (ø)
src/interactions/fene_bond.jl 92.59% <92.59%> (ø)
src/interactions/cosine_angle.jl 95.00% <95.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3b5d2b1...39d51f0. Read the comment docs.

ehsanirani commented 2 years ago

I will add some unit tests and an example code, hopefully in the next few days.

ehsanirani commented 2 years ago

I revised the code so it respects units now. Also added tests.

jgreener64 commented 2 years ago

Thanks for this!