Changeset 55c494


Ignore:
Timestamp:
May 19, 2021, 7:06:29 PM (4 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
b3bd7d
Parents:
15fc6a
git-author:
Frederik Heber <frederik.heber@…> (05/14/21 09:52:02)
git-committer:
Frederik Heber <frederik.heber@…> (05/19/21 19:06:29)
Message:

Added GeneratePotentialsAction.

  • this generates all potential combinations for a given fragment.
  • exposed PotentialFactory::getDefaultInstance() for constant instance to be able to gather more information about the potential such as the binding model.
  • DOCU: Added documentation.
  • TEST: Added regression test case.
Files:
7 added
7 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    r15fc6a r55c494  
    24642464          <note>Currently, only <productname>TREMOLO</productname>potential files are understood and can be parsed.</note>
    24652465        </section>
     2466        <section xml:id="potentials.generate-potentials">
     2467          <title xml:id="potentials.generate-potentials.title">Generate empirical potentials</title>
     2468          <para>The actions to fit potentials take either a single potential name or a
     2469          potentials file. In order to create all potentials that would match with its
     2470          particle types the following action can be called:
     2471          <programlisting>
     2472                  ... --generate-potentials
     2473                  --fragment-charges 8 1 1
     2474          </programlisting>
     2475          Here, it would create all potentials for a fragment specifying a water
     2476          molecule: harmonic_bond for O and H, morse for O and H, harmonic_angle
     2477          for H, O, and H (and not for O, H, H, or other combinations as these
     2478          subgraphs do not exists for the molecule H-O-H), and tersoff for the
     2479          types O and H.
     2480        </para>
     2481        </section>
    24662482        <section xml:id="potentials.save-potential">
    24672483          <title xml:id="potentials.save-potential.title">Saving an empirical potentials file</title>
  • src/Actions/GlobalListOfActions.hpp

    r15fc6a r55c494  
    106106  (MoleculeVerletIntegration) \
    107107  (PotentialFitPartialCharges) \
     108  (PotentialGeneratePotentials) \
    108109  (PotentialParseAtomFragments) \
    109110  (PotentialParseHomologies) \
  • src/Actions/Makefile.am

    r15fc6a r55c494  
    427427POTENTIALACTIONSOURCE = \
    428428  Actions/PotentialAction/FitPartialChargesAction.cpp \
     429  Actions/PotentialAction/GeneratePotentialsAction.cpp \
    429430  Actions/PotentialAction/ParseAtomFragmentsAction.cpp \
    430431  Actions/PotentialAction/ParseHomologiesAction.cpp \
     
    437438POTENTIALACTIONHEADER = \
    438439  Actions/PotentialAction/FitPartialChargesAction.hpp \
     440  Actions/PotentialAction/GeneratePotentialsAction.hpp \
    439441  Actions/PotentialAction/ParseAtomFragmentsAction.hpp \
    440442  Actions/PotentialAction/ParseHomologiesAction.hpp \
     
    447449POTENTIALACTIONDEFS = \
    448450  Actions/PotentialAction/FitPartialChargesAction.def  \
     451  Actions/PotentialAction/GeneratePotentialsAction.def \
    449452  Actions/PotentialAction/ParseAtomFragmentsAction.def \
    450453  Actions/PotentialAction/ParseHomologiesAction.def \
  • src/Potentials/PotentialFactory.cpp

    r15fc6a r55c494  
    172172}
    173173
     174EmpiricalPotential const * const PotentialFactory::getDefaultPotential(const enum PotentialTypes &_type) const {
     175  return const_cast<EmpiricalPotential const * const>(getDefaultPotential(getNameForType(_type)));
     176}
     177
     178
    174179CONSTRUCT_SINGLETON(PotentialFactory)
  • src/Potentials/PotentialFactory.hpp

    r15fc6a r55c494  
    4444public:
    4545
     46  /** Returns a default potential to which only we have access.
     47   *
     48   */
     49  EmpiricalPotential const * const getDefaultPotential(const enum PotentialTypes &_type) const;
     50
     51
    4652  /** Creates an instance of the requested potential.
    4753   *
  • tests/regression/Makefile.am

    r15fc6a r55c494  
    235235        $(srcdir)/Potential/FitPartialCharges/testsuite-potential-fit-partial-charges.at \
    236236        $(srcdir)/Potential/FitPotential/testsuite-potential-fit-potential.at \
     237        $(srcdir)/Potential/GeneratePotentials/testsuite-potential-generate-potentials.at \
    237238        $(srcdir)/Potential/SaveParseParticleParameters/testsuite-potential-save-parse-particle-parameters.at \
    238239        $(srcdir)/Potential/SaveParsePotentials/testsuite-potential-save-parse-potentials.at \
  • tests/regression/Potential/testsuite-potential.at

    r15fc6a r55c494  
    22#    MoleCuilder - creates and alters molecular systems
    33#    Copyright (C) 2008-2012 University of Bonn
    4 #    Copyright (C) 2013 Frederik Heber
     4#    Copyright (C) 2013-2021 Frederik Heber
    55#
    66#    This program is free software: you can redistribute it and/or modify
     
    3030# fitting particle charges to fragment results
    3131m4_include([Potential/FitPartialCharges/testsuite-potential-fit-partial-charges.at])
     32
     33# generating potentials to a fragment
     34m4_include([Potential/GeneratePotentials/testsuite-potential-generate-potentials.at])
Note: See TracChangeset for help on using the changeset viewer.