84 {
85 if (positions.size() !=
86 static_cast<Eigen::Index>(3 * elements_.size()) ||
87 !positions.allFinite())
88 throw std::invalid_argument(
89 "Finite native NWChem molecular coordinates required");
90 std::ostringstream input;
91 input
92 << "start point\necce_print point.ecce\nmemory total 1500 "
93 "mb\ncharge 0\ngeometry units bohr nocenter noautosym noautoz\n"
94 << std::setprecision(17);
95 for (std::size_t atom = 0; atom < elements_.size(); ++atom)
96 input << elements_[atom] << ' ' << positions[3 * atom] << ' '
97 << positions[3 * atom + 1] << ' ' << positions[3 * atom + 2]
98 << '\n';
99 input << "end\nbasis spherical\n * library 6-31g*\nend\ndft\n xc "
100 "b3lyp\n mult 1\n iterations 500\n direct\n grid "
101 << settings_.gridName() << " nodisk\n";
103 input << " convergence energy 1e-11 density 1e-10 gradient 1e-10\n";
104 else
105 input << " convergence energy 1e-6 density 1e-5 gradient 5e-4\n";
106 if (dispersion_) input << " disp vdw 3\n";
107 input << "end\n";
108 if (curvature) input << "hessian\n thresh 1e-10\nend\n";
109 input << "task dft gradient\n";
110 if (curvature) input << "task dft frequencies\n";
111 return input.str();
112 }