| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e721303 commit 62d1c2d
8 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,18 +7,18 @@ name = "pypi" | |||
| 7 | 7 | ||
| 8 | 8 | [packages] | |
| 9 | 9 | ||
| 10 | + docopt = "*" | ||
| 11 | + pyparsing = "*" | ||
| 12 | + | ||
| 13 | + [dev-packages] | ||
| 14 | + | ||
| 10 | 15 | Pygments = "*" | |
| 11 | 16 | breathe = "*" | |
| 12 | - docopt = "*" | ||
| 13 | 17 | matplotlib = "*" | |
| 14 | - pyparsing = "*" | ||
| 15 | 18 | PyYAML = "*" | |
| 16 | 19 | recommonmark = "*" | |
| 17 | 20 | Sphinx = "*" | |
| 18 | 21 | sphinx_rtd_theme = "*" | |
| 19 | 22 | sphinxcontrib-bibtex = "*" | |
| 20 | 23 | yapf = "*" | |
| 21 | 24 | fprettify = "*" | |
| 22 | - | ||
| 23 | - [dev-packages] | ||
| 24 | - | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -547,10 +547,9 @@ void Meddle::GaussCheck() const { | |||
| 547 | 547 | Eigen::VectorXd nuclear_mep = computeMEP(input_.molecule(), cavity_->elements()); | |
| 548 | 548 | Eigen::VectorXd nuclear_asc = K_0_->computeCharge(nuclear_mep); | |
| 549 | 549 | double total_nuclear_asc = nuclear_asc.sum() * cavity_->pointGroup().nrIrrep(); | |
| 550 | - double gauss_nuclear_asc = | ||
| 551 | - detail::GaussEstimate(input_.molecule().charges(), | ||
| 552 | - input_.outsideStaticGreenParams().epsilon, | ||
| 553 | - input_.correction()); | ||
| 550 | + double gauss_nuclear_asc = GaussEstimate(input_.molecule().charges(), | ||
| 551 | + input_.outsideStaticGreenParams().epsilon, | ||
| 552 | + input_.correction()); | ||
| 554 | 553 | double difference = total_nuclear_asc - gauss_nuclear_asc; | |
| 555 | 554 | std::stringstream tmp; | |
| 556 | 555 | if (!utils::isZero(difference, 1.0e-2)) { | |
@@ -651,11 +650,5 @@ void print(const PCMInput & inp) { | |||
| 651 | 650 | std::cout << "outside type " << std::string(inp.outside_type) << std::endl; | |
| 652 | 651 | std::cout << "epsilon outside " << inp.outside_epsilon << std::endl; | |
| 653 | 652 | } | |
| 654 | - | ||
| 655 | - double GaussEstimate(const Eigen::VectorXd & charges, | ||
| 656 | - double permittivity, | ||
| 657 | - double correction) { | ||
| 658 | - return (-charges.sum() * (permittivity - 1) / (permittivity + correction)); | ||
| 659 | - } | ||
| 660 | 653 | } // namespace detail | |
| 661 | 654 | } // namespace pcm | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,15 +62,6 @@ void initSpheresAtoms(const Input &, | |||
| 62 | 62 | const Eigen::Matrix3Xd &, | |
| 63 | 63 | std::vector<Sphere> &); | |
| 64 | 64 | void print(const PCMInput &); | |
| 65 | - | ||
| 66 | - /*! Gauss' theorem estimate of the total ASC for a set of point charges | ||
| 67 | - * \param[in] charges Vector of point charges | ||
| 68 | - * \param[in] permittivity Solvent permittivity | ||
| 69 | - * \param[in] correction The CPCM correction factor | ||
| 70 | - */ | ||
| 71 | - double GaussEstimate(const Eigen::VectorXd & charges, | ||
| 72 | - double permittivity, | ||
| 73 | - double correction = 0.0); | ||
| 74 | 65 | } // namespace detail | |
| 75 | 66 | ||
| 76 | 67 | /*! \class Meddle | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -302,4 +302,10 @@ Eigen::VectorXd computeMEP(const std::vector<Element> & el, | |||
| 302 | 302 | } | |
| 303 | 303 | return mep; | |
| 304 | 304 | } | |
| 305 | + | ||
| 306 | + double GaussEstimate(const Eigen::VectorXd & charges, | ||
| 307 | + double permittivity, | ||
| 308 | + double correction) { | ||
| 309 | + return (-charges.sum() * (permittivity - 1) / (permittivity + correction)); | ||
| 310 | + } | ||
| 305 | 311 | } // namespace pcm | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -240,4 +240,13 @@ PCMSolver_EXPORT Eigen::VectorXd computeMEP(const Molecule & mol, | |||
| 240 | 240 | Eigen::VectorXd computeMEP(const std::vector<cavity::Element> & el, | |
| 241 | 241 | double charge = 1.0, | |
| 242 | 242 | const Eigen::Vector3d & origin = Eigen::Vector3d::Zero()); | |
| 243 | + | ||
| 244 | + /*! Gauss' theorem estimate of the total ASC for a set of point charges | ||
| 245 | + * \param[in] charges Vector of point charges | ||
| 246 | + * \param[in] permittivity Solvent permittivity | ||
| 247 | + * \param[in] correction The CPCM correction factor | ||
| 248 | + */ | ||
| 249 | + PCMSolver_EXPORT double GaussEstimate(const Eigen::VectorXd & charges, | ||
| 250 | + double permittivity, | ||
| 251 | + double correction = 0.0); | ||
| 243 | 252 | } // namespace pcm | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -73,15 +73,6 @@ inline Molecule C6H6(); | |||
| 73 | 73 | */ | |
| 74 | 74 | inline Molecule H2O(); | |
| 75 | 75 | ||
| 76 | - /*! Returns the Gauss' theorem estimate of the total ASC | ||
| 77 | - * \param[in] charges Vector of molecular charges | ||
| 78 | - * \param[in] permittivity Solvent permittivity | ||
| 79 | - * \param[in] correction The CPCM correction factor | ||
| 80 | - */ | ||
| 81 | - inline double Gauss_ASC(const Eigen::VectorXd & charges, | ||
| 82 | - double permittivity, | ||
| 83 | - double correction = 0.0); | ||
| 84 | - | ||
| 85 | 76 | template <int group> Molecule dummy(double radius, const Eigen::Vector3d & center) { | |
| 86 | 77 | std::vector<Sphere> spheres; | |
| 87 | 78 | Sphere sph1(center, radius); | |
@@ -546,12 +537,6 @@ Molecule H2O() { | |||
| 546 | 537 | ||
| 547 | 538 | return Molecule(nAtoms, charges, masses, geom, atoms, spheres, pGroup); | |
| 548 | 539 | }; | |
| 549 | - | ||
| 550 | - double Gauss_ASC(const Eigen::VectorXd & charges, | ||
| 551 | - double permittivity, | ||
| 552 | - double correction) { | ||
| 553 | - return (-charges.sum() * (permittivity - 1) / (permittivity + correction)); | ||
| 554 | - } | ||
| 555 | 540 | } // namespace pcm | |
| 556 | 541 | ||
| 557 | 542 | #endif // TESTINGMOLECULES_HPP | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,7 +71,7 @@ TEST_CASE("Test solver for the C-PCM with H2O molecule and a GePol cavity", | |||
| 71 | 71 | // for CPCM it will be -Q*(epsilon-1)/(epsilon + correction) | |
| 72 | 72 | Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size); | |
| 73 | 73 | fake_asc = solver.computeCharge(fake_mep); | |
| 74 | - double totalASC = Gauss_ASC(molecule.charges(), permittivity, correction); | ||
| 74 | + double totalASC = GaussEstimate(molecule.charges(), permittivity, correction); | ||
| 75 | 75 | double totalFakeASC = fake_asc.sum(); | |
| 76 | 76 | CAPTURE(totalASC - totalFakeASC); | |
| 77 | 77 | REQUIRE(totalASC == Approx(totalFakeASC).epsilon(1.0e-03)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments