Skip to content
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

Kokkos charmmfsw pair and dihedral styles #4030

Merged
merged 29 commits into from Jan 18, 2024

Conversation

alphataubio
Copy link
Contributor

@alphataubio alphataubio commented Jan 2, 2024

Summary

add pair/lj/charmmfsw/coul/long/kk and dihedral/charmmfsw/kk

Related Issue(s)

https://matsci.org/t/charmmfsw-pair-style-and-gpu-acceleration/39482

Author(s)

Mitch Murphy, alphataubio.com, alphataubio@gmail.com

Licensing

By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Backward Compatibility

n/a

Implementation Notes

*** DRAFT VERSION 1 (lots of comments to be removed just before merge) ***

(1) first draft version of PairLJCharmmfswCoulLongKokkos exactly same as PairLJCharmmCoulLongKokkos but with new class name. compiles without errors or warnings

method: track changes from serial kspace pair_lj_charmm_coul_long to pair_lj_charmmfsw_coul_long and apply to PairLJCharmmfswCoulLongKokkos

% diff pair_lj_charmm_coul_long.h pair_lj_charmmfsw_coul_long.h

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system
  • Suitable tests have been added to the unittest tree.
  • A package specific README file has been included or updated
  • One or more example input decks are included

Further Information, Files, and Links

My test input is a protein-dna simulation (1HVN), the smallest number of atoms available on PDB with at least one protein, at least one dna, and no modified engineered residues. 1HVN lammps input scripts created by charmm-gui.org:

1hvn-lammps-charmm.zip

1hvn-lammps-charmmfsw.zip

@alphataubio alphataubio changed the title Kokkos charmmfsw pair and dihedral styles [DRAFT] Kokkos charmmfsw pair and dihedral styles Jan 3, 2024
alphataubio and others added 8 commits January 3, 2024 03:00
…jtype].lj3:params(itype,jtype).lj3)" in compute_evdwl
  // superclass destructor from KSPACE/pair_lj_charmmfsw_coul_long.cpp:81
  // resets force->qqr2e = force->qqr2e_lammps_real at end of timestep 0
  // causing ~E-6 errors for steps 1,2,... everywhere in this class when
  // running kokkos with openmp (and probably with GPUs also).
  //
  // WORKAROUND: for now until guidance from lammps devs is to
  // reset it back force->qqr2e = force->qqr2e_charmm_real here.
    //
    // force->qqr2e = force->qqr2e_lammps_real
    //
    // at end of timestep 0 causing ~E-6 errors for steps 1,2,...
    // everywhere in pair_lj_charmmfsw_coul_long_kokkos when
    // running kokkos with openmp (and probably with GPUs also).
    //
    // WORKAROUND: for now until guidance from lammps devs is to
    // comment out this line here (commit to be reversed later).

    //force->qqr2e = force->qqr2e_lammps_real;
This reverts commit de1f6ee.

my first idea to reset back force->qqr2e = force->qqr2e_charmm_real didnt work because class destructor gets called first THEN superclass destructor gets called
@alphataubio alphataubio marked this pull request as ready for review January 5, 2024 16:25
@alphataubio alphataubio changed the title [DRAFT] Kokkos charmmfsw pair and dihedral styles Kokkos charmmfsw pair and dihedral styles Jan 5, 2024
akohlmey and others added 12 commits January 5, 2024 13:45
- gathered all  tutorial like discussion, equations, and plot for old charmm and new charmmfsw into howto

- added equations and another plot for charmmfsw

- charmmgui 1HVN and 2CV5 examples
checked in as a separate commit, if maintainer doesnt approve, then easy to revert atomically.

if maintainer approves, then ill add mentions to examples/README and Examples.rst, and anywhere else needed
@stanmoore1
Copy link
Contributor

stanmoore1 commented Jan 8, 2024

@alphataubio this now gives correct numerics on the GPU for my test, and does not hang.

Copy link
Contributor

@stanmoore1 stanmoore1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alphataubio overall this is almost ready to merge, just a few minor change requests.

examples/charmm/1hvn/restraints/dihe.restraint Outdated Show resolved Hide resolved
examples/charmm/1hvn/sysinfo.dat Outdated Show resolved Hide resolved
@alphataubio
Copy link
Contributor Author

for documentation purposes and reproducibility later, im attaching to this PR mathematica notebook used to create plots. had to use zip because .nb files not allowed on github

Howto_bioFF.nb.zip

@akohlmey akohlmey merged commit 54794a4 into lammps:develop Jan 18, 2024
@alphataubio alphataubio deleted the alphataubio-charmmfsw-kk branch February 18, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants