Skip to content

Commit

Permalink
Make H2+ bond length customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
susilehtola committed Mar 5, 2024
1 parent 1be8bf3 commit 5f6be64
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/contrib/hneoci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ int main_guarded(int argc, char **argv) {
settings.add_double("ProtonMass", "Protonic mass", 1836.15267389);
settings.add_int("Verbosity", "Verboseness level", 5);
settings.add_bool("H2", "Run H2+ instead of H atom?", false);
settings.add_double("H2BondLength", "Bond length for H2+ in a.u.", 2.0);

// Parse settings
settings.parse(std::string(argv[1]),true);
Expand All @@ -103,6 +104,7 @@ int main_guarded(int argc, char **argv) {
bool verbose=settings.get_bool("Verbose");
double proton_mass = settings.get_double("ProtonMass");
bool dimer = settings.get_bool("H2");
double R = settings.get_double("H2BondLength");

// Read in basis sets
BasisSetLibrary baslib;
Expand Down Expand Up @@ -147,8 +149,8 @@ int main_guarded(int argc, char **argv) {
if(dimer) {
atoms.push_back(atoms[0]);
atoms[1].num=1;
atoms[1].z=2.0;
printf("Placed second atom at 2.0 bohr distance\n");
atoms[1].z=R;
printf("Placed second atom at %e bohr distance\n",R);
}

// Construct the orbital basis sets
Expand Down

0 comments on commit 5f6be64

Please sign in to comment.