From 5f6be6428a5eacd1b029d10a90946526dd8c2103 Mon Sep 17 00:00:00 2001 From: Susi Lehtola Date: Tue, 5 Mar 2024 09:32:26 +0200 Subject: [PATCH] Make H2+ bond length customizable --- src/contrib/hneoci.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/contrib/hneoci.cpp b/src/contrib/hneoci.cpp index 486c692b..0c9bd78c 100644 --- a/src/contrib/hneoci.cpp +++ b/src/contrib/hneoci.cpp @@ -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); @@ -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; @@ -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