| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5e9b513 commit 3b35a6c
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -489,28 +489,11 @@ void setupInput(bool from_host) | |||
| 489 | 489 | parsedInput = boost::make_shared<Input>(Input("@pcmsolver.inp")); | |
| 490 | 490 | #endif | |
| 491 | 491 | } | |
| 492 | - // The only thing we can't create immediately is the vector of spheres | ||
| 492 | + // The only thing we can't create immediately is the molecule | ||
| 493 | 493 | // from which the cavity is to be built. | |
| 494 | - std::string _mode = parsedInput->mode(); | ||
| 495 | - // Get the total number of nuclei and the geometry anyway | ||
| 496 | - Eigen::VectorXd charges; | ||
| 497 | - Eigen::Matrix3Xd centers; | ||
| 498 | - initAtoms(charges, centers); | ||
| 499 | - std::vector<Sphere> spheres; | ||
| 500 | - | ||
| 501 | - // We create an initial list of spheres as if we were in the Implicit mode | ||
| 502 | - // regardless of what the user told us. | ||
| 503 | - // If we are in the Implicit mode we just need to let the Input object know about | ||
| 504 | - // the list of spheres. | ||
| 505 | - // Some post-processing of the list is needed in the Atoms mode. | ||
| 506 | - initSpheresImplicit(charges, centers, spheres); | ||
| 507 | - | ||
| 508 | - if (_mode == "IMPLICIT") { | ||
| 509 | - parsedInput->spheres(spheres); | ||
| 510 | - } else if (_mode == "ATOMS") { | ||
| 511 | - initSpheresAtoms(centers, spheres); | ||
| 512 | - parsedInput->spheres(spheres); | ||
| 513 | - } | ||
| 494 | + Molecule molec; | ||
| 495 | + initMolecule(molec); | ||
| 496 | + parsedInput->molecule(molec); | ||
| 514 | 497 | } | |
| 515 | 498 | ||
| 516 | 499 | void initCavity() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,9 +93,9 @@ class Input | |||
| 93 | 93 | double radii(int i) { return radii_[i]; } | |
| 94 | 94 | std::vector<Sphere> spheres() { return spheres_; } | |
| 95 | 95 | Sphere spheres(int i) { return spheres_[i]; } | |
| 96 | - void spheres(const std::vector<Sphere> & sph) { spheres_ = sph; } | ||
| 97 | 96 | Molecule molecule() { return molecule_; } | |
| 98 | - void molecule(const Molecule & m) { molecule_ = m; } | ||
| 97 | + /// This method sets the molecule and the list of spheres | ||
| 98 | + void molecule(const Molecule & m) { molecule_ = m; spheres_ = molecule_.spheres(); } | ||
| 99 | 99 | // Medium section input | |
| 100 | 100 | Solvent solvent() { return solvent_; } | |
| 101 | 101 | bool fromSolvent() { return hasSolvent_; } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments