FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

List of spheres and molecules now coexist. Will test with DALTON befo… · PCMSolver/pcmsolver@3b35a6c · GitHub

Repository navigation

Commit 3b35a6c

Browse files
Roberto Di Remigio
committed
List of spheres and molecules now coexist. Will test with DALTON before shifting completely to molecule
1 parent 5e9b513 commit 3b35a6c

2 files changed

Lines changed: 6 additions & 23 deletions

File tree

‎src/interface/Interface.cpp‎

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -489,28 +489,11 @@ void setupInput(bool from_host)
489489
parsedInput = boost::make_shared<Input>(Input("@pcmsolver.inp"));
490490
#endif
491491
}
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
493493
// 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);
514497
}
515498

516499
void initCavity()

‎src/utils/Input.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ class Input
9393
double radii(int i) { return radii_[i]; }
9494
std::vector<Sphere> spheres() { return spheres_; }
9595
Sphere spheres(int i) { return spheres_[i]; }
96-
void spheres(const std::vector<Sphere> & sph) { spheres_ = sph; }
9796
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(); }
9999
// Medium section input
100100
Solvent solvent() { return solvent_; }
101101
bool fromSolvent() { return hasSolvent_; }

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL