Skip to content

Allow TABPOT type pairwise potential#2313

Merged
oschuett merged 3 commits intocp2k:masterfrom
k9cdt:master
Oct 7, 2022
Merged

Allow TABPOT type pairwise potential#2313
oschuett merged 3 commits intocp2k:masterfrom
k9cdt:master

Conversation

@k9cdt
Copy link
Contributor

@k9cdt k9cdt commented Sep 30, 2022

Added feature to allow using a LAMMPS style input for pairwise potentials. In this file lists the potential and forces in a table, allowing maximum flexibility in some cases.

The first draft of the code was written by @alexmir18 when he was a postdoc in Voth Group at UChicago.

@k9cdt k9cdt closed this Sep 30, 2022
@oschuett
Copy link
Member

oschuett commented Oct 1, 2022

Out of curiosity, why did you withdraw this PR?

At first glance it looks good to me. My only comments would be:

  • please run make pretty
  • please add at least one test
  • please use tap consistently (some names use tp)

On a related note, the GENPOT also allows for (almost) arbitrary potentials.

@k9cdt
Copy link
Contributor Author

k9cdt commented Oct 4, 2022

Yes I am thinking about adding tests. So far everything is only theoretically implemented correct. I will do the make pretty as well.

@k9cdt k9cdt reopened this Oct 4, 2022
quip_type = 15, &
gal21_type = 16
gal21_type = 16, &
tp_type = 17
Copy link
Member

Choose a reason for hiding this comment

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

Please rename tp_type -> tab_type.


! **************************************************************************************************

TYPE tp_pot_type
Copy link
Member

Choose a reason for hiding this comment

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

Please rename tp_pot_type -> tab_pot_type.

TYPE(gal_pot_type), POINTER :: gal
TYPE(gal21_pot_type), POINTER :: gal21
TYPE(ftd_pot_type), POINTER :: ftd
TYPE(tp_pot_type), POINTER :: tp
Copy link
Member

Choose a reason for hiding this comment

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

Please rename field: tp -> tab.

SUBROUTINE pair_potential_reallocate(p, lb1_new, ub1_new, lj, lj_charmm, williams, &
goodwin, eam, quip, bmhft, bmhftd, ipbv, buck4r, buckmo, gp, tersoff, &
siepmann, gal, gal21)
siepmann, gal, gal21, tp)
Copy link
Member

Choose a reason for hiding this comment

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

Please rename arguments and variables tp -> tab everywhere.

@oschuett
Copy link
Member

oschuett commented Oct 6, 2022

It seems your git history got pretty banged up (don't worry, it happens to all of us ;-).

The simplest solution is probably to first backup your files, then run:

git fetch origin
git reset --hard origin/master

... and then copy your modified files back in.

Alternatively, you can have a look at https://github.com/cp2k/cp2k/wiki/Git-Tips-&-Tricks

@k9cdt k9cdt closed this Oct 6, 2022
@k9cdt k9cdt reopened this Oct 6, 2022
@oschuett oschuett merged commit 6df1cbb into cp2k:master Oct 7, 2022
@oschuett
Copy link
Member

oschuett commented Oct 7, 2022

Thanks a lot for contributing!

@alexmir18
Copy link

I am a developer of a TABPOT feature in CP2K (Voth group, University of Chicago, 2018-2020). Thanks to k9cdt for adding tests, making it clean, and merging it with the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants