Changeset a4b917


Ignore:
Timestamp:
Sep 13, 2025, 2:43:45 PM (6 weeks ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
85dd16
Parents:
a0d8aa
git-author:
Frederik Heber <frederik.heber@…> (08/17/25 17:42:07)
git-committer:
Frederik Heber <frederik.heber@…> (09/13/25 14:43:45)
Message:

Adds add and remove potential actions.

  • DOC: Adds missing actions to userguide.
  • TESTS: added actions test case with undo, redo and various cases.
Files:
12 added
5 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    ra0d8aa ra4b917  
    23462346        evaluations of terms of the many-body expansion of the Born-Oppenheimer
    23472347        surface of the full system.</para>
     2348        <section xml:id="potentials.add-potential">
     2349          <title xml:id="potentials.add-potential.title">Adding potentials</title>
     2350          <para>First of all, potentials can be added using</para>
     2351          <programlisting>
     2352  ... --add-potential Morse \
     2353      --potential-charges 8 1
     2354          </programlisting>
     2355          <para>This will add a "Morse" potential between the elements carbon(8) and
     2356          hydrogen(1) (the order <emph>not</emph> always irrelevant. Here, for this
     2357          pair potential it is).</para>
     2358        </section>
     2359        <section xml:id="potentials.remove-potential">
     2360          <title xml:id="potentials.remove-potential.title">Removing potentials</title>
     2361          <para>And similarly, potentials can be removed using</para>
     2362          <programlisting>
     2363  ... --remove-potential Morse \
     2364      --potential-charges 8 1
     2365          </programlisting>
     2366          <para>This will remove a "Morse" potential between the elements carbon(8) and
     2367          hydrogen(1).</para>
     2368          <note>Typically, however, you do not want to add potentials this way. They
     2369          lack the parametrization that make them any useful. In the following, we
     2370          present more actions for fitting the potential to calculcated energies and
     2371          forces and thus obtaining such a useful parametrization.</note>
     2372        </section>
    23482373        <section xml:id="potentials.fit-potential">
    23492374          <title xml:id="potentials.fit-potential.title">Fitting empirical potentials</title>
  • src/Actions/GlobalListOfActions.hpp

    ra0d8aa ra4b917  
    105105  (MoleculeTranslate) \
    106106  (MoleculeVerletIntegration) \
     107  (PotentialAddPotential) \
    107108  (PotentialClearHomologies) \
    108109  (PotentialFitPartialCharges) \
     
    112113  (PotentialParseParticleParameters) \
    113114  (PotentialParsePotentials) \
     115  (PotentialRemovePotential) \
    114116  (PotentialSaveAtomFragments) \
    115117  (PotentialSaveHomologies) \
  • src/Actions/Makefile.am

    ra0d8aa ra4b917  
    435435
    436436POTENTIALACTIONSOURCE = \
     437  Actions/PotentialAction/AddPotentialAction.cpp \
    437438  Actions/PotentialAction/ClearHomologiesAction.cpp \
    438439  Actions/PotentialAction/FitPartialChargesAction.cpp \
     
    442443  Actions/PotentialAction/ParseParticleParametersAction.cpp \
    443444  Actions/PotentialAction/ParsePotentialsAction.cpp \
     445  Actions/PotentialAction/RemovePotentialAction.cpp \
    444446  Actions/PotentialAction/SaveAtomFragmentsAction.cpp \
    445447  Actions/PotentialAction/SaveHomologiesAction.cpp \
     
    447449  Actions/PotentialAction/SavePotentialsAction.cpp
    448450POTENTIALACTIONHEADER = \
     451  Actions/PotentialAction/AddPotentialAction.hpp \
    449452  Actions/PotentialAction/ClearHomologiesAction.hpp \
    450453  Actions/PotentialAction/FitPartialChargesAction.hpp \
     
    454457  Actions/PotentialAction/ParseParticleParametersAction.hpp \
    455458  Actions/PotentialAction/ParsePotentialsAction.hpp \
     459  Actions/PotentialAction/RemovePotentialAction.hpp \
    456460  Actions/PotentialAction/SaveAtomFragmentsAction.hpp \
    457461  Actions/PotentialAction/SaveHomologiesAction.hpp \
     
    459463  Actions/PotentialAction/SavePotentialsAction.hpp
    460464POTENTIALACTIONDEFS = \
     465  Actions/PotentialAction/AddPotentialAction.def \
    461466  Actions/PotentialAction/ClearHomologiesAction.def \
    462467  Actions/PotentialAction/FitPartialChargesAction.def  \
     
    466471  Actions/PotentialAction/ParseParticleParametersAction.def \
    467472  Actions/PotentialAction/ParsePotentialsAction.def \
     473  Actions/PotentialAction/RemovePotentialAction.def \
    468474  Actions/PotentialAction/SaveAtomFragmentsAction.def \
    469475  Actions/PotentialAction/SaveHomologiesAction.def \
  • tests/regression/Makefile.am

    ra0d8aa ra4b917  
    234234        $(srcdir)/Parser/Xyz/testsuite-parser-xyz-save.at \
    235235        $(srcdir)/Potential/testsuite-potential.at \
     236        $(srcdir)/Potential/AddPotential/testsuite-potential-add-potential.at \
     237        $(srcdir)/Potential/AddPotential/testsuite-potential-add-potential-various_cases.at \
    236238        $(srcdir)/Potential/FitCompoundPotential/testsuite-potential-fit-compound-potential.at \
    237239        $(srcdir)/Potential/FitPartialCharges/testsuite-potential-fit-partial-charges.at \
    238240        $(srcdir)/Potential/FitPotential/testsuite-potential-fit-potential.at \
    239241        $(srcdir)/Potential/GeneratePotentials/testsuite-potential-generate-potentials.at \
     242        $(srcdir)/Potential/RemovePotential/testsuite-potential-remove-potential.at \
     243        $(srcdir)/Potential/RemovePotential/testsuite-potential-remove-potential-various_cases.at \
    240244        $(srcdir)/Potential/SaveParseParticleParameters/testsuite-potential-save-parse-particle-parameters.at \
    241245        $(srcdir)/Potential/SaveParsePotentials/testsuite-potential-save-parse-potentials.at \
  • tests/regression/Potential/testsuite-potential.at

    ra0d8aa ra4b917  
    1919AT_BANNER([MoleCuilder - potential tests])
    2020
     21# adding a potential
     22m4_include([Potential/AddPotential/testsuite-potential-add-potential.at])
     23m4_include([Potential/AddPotential/testsuite-potential-add-potential-various_cases.at])
     24
    2125# parsing and saving potential file
    2226m4_include([Potential/SaveParsePotentials/testsuite-potential-save-parse-potentials.at])
     27
     28# removing a potential
     29m4_include([Potential/RemovePotential/testsuite-potential-remove-potential.at])
     30m4_include([Potential/RemovePotential/testsuite-potential-remove-potential-various_cases.at])
    2331
    2432# fitting potential to fragment results
Note: See TracChangeset for help on using the changeset viewer.