Changeset 2f9faf
- Timestamp:
- Mar 24, 2017, 10:12:21 AM (8 years ago)
- Branches:
- FitPartialCharges_GlobalError
- Children:
- a3d08c
- Parents:
- 407d2c
- git-author:
- Frederik Heber <heber@…> (10/09/16 21:28:59)
- git-committer:
- Frederik Heber <heber@…> (03/24/17 10:12:21)
- Files:
-
- 8 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/userguide/userguide.xml
r407d2c r2f9faf 1900 1900 <note>Again, only the <productname>TREMOLO</productname>potential format is understood currently and is written.</note> 1901 1901 </section> 1902 <section xml:id="potentials.fit-fragment-partial-charges"> 1903 <title xml:id="potentials.fit-fragment-partial-charges.title">Fitting partial particle charges</title> 1904 <para>There are two ways at the moment of fitting partial charges: One 1905 of them uses the FragmentationResultContainer and the other uses the 1906 HomologyContainer. The first, which is this action, only works for 1907 a single time step, while the latter may use the fragment results 1908 obtained from many time steps. 1909 </para> 1910 <programlisting> 1911 ... --fit-fragment-partial-charges \ 1912 --enforce-net-zero-charge 1 \ 1913 --radius 1.5 1914 </programlisting> 1915 <para>The function call will fit partial charges to all selected 1916 atoms whose fragment results are currently contained in the container. 1917 It will mask the potential around each atom with a radius of 1.5. 1918 Note that this is important because of the smearing of nuclei charges 1919 via the "near-field-cells" parameter. Essentially, the masking radius 1920 should be as large as the b-spline diameter. 1921 </para> 1922 </section> 1902 1923 <section xml:id="potentials.fit-partial-charges"> 1903 1924 <title xml:id="potentials.fit-partial-charges.title">Fitting partial particle charges</title> … … 1927 1948 <programlisting> 1928 1949 ... --fit-partial-charges \ 1929 --potential-file water.particles \1930 1950 --radius 1.5 1931 1951 </programlisting> … … 1935 1955 from the homologies container. For each of the atoms then an average 1936 1956 partial charge is computed by fitting their respective Coulomb 1937 potential to the obtained from the fragment calculations. Resulting 1938 values are stored in <filename>water.particles</filename>. The 1957 potential to the obtained from the fragment calculations. The 1939 1958 radius is used to mask a certain region directly around the nuclei 1940 1959 from the fit procedure. As here the charges of the core electrons and 1941 1960 the nuclei itself dominate, we however are only interested in a good 1942 1961 approximation to the long-range potential, this mask radius allows 1943 to give the range of the excluded zone.</para> 1962 to give the range of the excluded zone. Also, it is important to 1963 remove the smeared nuclei charges via cardinal b-splines whose 1964 broadened peaks are artifically and only become valid in the 1965 far-field.</para> 1944 1966 </section> 1945 1967 <section xml:id="potentials.parse-particle-parameters"> -
src/Actions/GlobalListOfActions.hpp
r407d2c r2f9faf 92 92 (MoleculeTranslate) \ 93 93 (MoleculeVerletIntegration) \ 94 (PotentialFitFragmentPartialCharges) \ 94 95 (PotentialFitPartialCharges) \ 95 96 (PotentialParseAtomFragments) \ -
src/Actions/Makefile.am
r407d2c r2f9faf 380 380 381 381 POTENTIALACTIONSOURCE = \ 382 Actions/PotentialAction/FitFragmentPartialChargesAction.cpp \ 382 383 Actions/PotentialAction/FitPartialChargesAction.cpp \ 383 384 Actions/PotentialAction/ParseAtomFragmentsAction.cpp \ … … 390 391 Actions/PotentialAction/SavePotentialsAction.cpp 391 392 POTENTIALACTIONHEADER = \ 393 Actions/PotentialAction/FitFragmentPartialChargesAction.hpp \ 392 394 Actions/PotentialAction/FitPartialChargesAction.hpp \ 393 395 Actions/PotentialAction/ParseAtomFragmentsAction.hpp \ … … 400 402 Actions/PotentialAction/SavePotentialsAction.hpp 401 403 POTENTIALACTIONDEFS = \ 404 Actions/PotentialAction/FitFragmentPartialChargesAction.def \ 402 405 Actions/PotentialAction/FitPartialChargesAction.def \ 403 406 Actions/PotentialAction/ParseAtomFragmentsAction.def \ -
src/Actions/PotentialAction/FitPartialChargesAction.cpp
r407d2c r2f9faf 184 184 } 185 185 186 inline SerializablePotential::ParticleTypes_t187 getParticleTypesForAtomIdSet(const AtomIdSet &_atoms)188 {189 SerializablePotential::ParticleTypes_t particletypes;190 particletypes.resize(_atoms.size());191 std::transform(192 _atoms.begin(), _atoms.end(),193 particletypes.begin(),194 boost::bind(&atom::getElementNo, _1));195 return particletypes;196 }197 198 186 static 199 187 std::set<KeySet> accumulateKeySetsForAtoms( … … 282 270 } 283 271 284 const atom * getNonHydrogenSurrogate(const atom * const _walker)272 static const atom * getNonHydrogenSurrogate(const atom * const _walker) 285 273 { 286 274 const atom * surrogate = _walker; … … 298 286 } 299 287 300 double fitAverageChargeToAtom(288 static double fitAverageChargeToAtom( 301 289 const atom * const _walker, 302 290 const AtomFragmentsMap &_atomfragments, … … 361 349 } 362 350 363 void addToParticleRegistry(351 static void addToParticleRegistry( 364 352 const ParticleFactory &factory, 365 353 const periodentafel &periode, … … 400 388 } 401 389 402 bool isNotHydrogen(const atom * const _atom)390 static bool isNotHydrogen(const atom * const _atom) 403 391 { 404 392 return (_atom->getElementNo() != (atomicNumber_t) 1); 405 393 } 406 394 407 st ruct KeySetSizeComp {395 static struct KeySetSizeComp { 408 396 bool operator() (const KeySet &a, const KeySet &b) { return a.size()<b.size(); } 409 397 } keyset_comparator; -
tests/regression/Makefile.am
r407d2c r2f9faf 187 187 $(srcdir)/Parser/Xyz/testsuite-parser-xyz-save.at \ 188 188 $(srcdir)/Potential/testsuite-potential.at \ 189 $(srcdir)/Potential/FitFragmentPartialCharges/testsuite-potential-fit-fragment-partial-charges.at \ 189 190 $(srcdir)/Potential/FitPartialCharges/testsuite-potential-fit-partial-charges.at \ 190 191 $(srcdir)/Potential/FitPotential/testsuite-potential-fit-potential.at \ -
tests/regression/Potential/testsuite-potential.at
r407d2c r2f9faf 28 28 m4_include([Potential/SaveParseParticleParameters/testsuite-potential-save-parse-particle-parameters.at]) 29 29 30 # fitting particle charges to homologous graphs 31 m4_include([Potential/FitPartialCharges/testsuite-potential-fit-partial-charges.at]) 32 30 33 # fitting particle charges to fragment results 31 m4_include([Potential/Fit PartialCharges/testsuite-potential-fit-partial-charges.at])34 m4_include([Potential/FitFragmentPartialCharges/testsuite-potential-fit-fragment-partial-charges.at])
Note:
See TracChangeset
for help on using the changeset viewer.