8 #ifndef mpqc_interfaces_tiledarray_tests_common_hpp
9 #define mpqc_interfaces_tiledarray_tests_common_hpp
11 #include <chemistry/molecule/molecule.h>
12 #include <chemistry/qc/basis/basis.h>
13 #include <chemistry/qc/basis/split.h>
14 #include <chemistry/qc/basis/integral.h>
15 #include <mpqc/integrals/integrals.hpp>
16 #include <mpqc/integrals/integralenginepool.hpp>
17 #include <tiledarray.h>
18 #include <mpqc/interfaces/tiledarray/array_ints.hpp>
28 using string = std::string;
32 template<
typename T>
using IntPool = IntegralEnginePool<T>;
38 get_molecule(
const string &mol_name){
39 R<Molecule> mol =
new Molecule;
43 mol->add_atom(1, 0,1,1);
46 else if(mol_name ==
"H2O"){
47 mol->add_atom(8, 0, 0, 0);
48 mol->add_atom(1, 0, 1, -1);
49 mol->add_atom(1, 0, 1, 1);
52 else if (mol_name ==
"TRange1Test"){
53 mol->add_atom( 6, 0, 0, 0);
54 mol->add_atom( 9, -1, -1, 0);
55 mol->add_atom( 1, 0.6, -0.1, 0.9);
56 mol->add_atom(17, -0.75, 1.5, 0);
57 mol->add_atom(35, 1.1, -0.18, -1.5);
68 get_basis(
const string &basis_name,
const R<Molecule> &mol){
70 R<AKeyVal> akv =
new AKeyVal;
71 akv->assign(
"name", basis_name);
72 akv->assign(
"molecule", mol.pointer());
74 R<Basis> basis =
new Basis(R<KeyVal>(akv));
75 if(basis->max_ncontraction() > 1){
89 get_molecule(
const string &mol_name =
""){
92 if(!mol_name.empty()){
94 mol = detail::get_molecule(mol_name);
96 else if(mol_name ==
"H2O"){
97 mol = detail::get_molecule(mol_name);
99 else if (mol_name ==
"TRange1Test"){
100 mol = detail::get_molecule(mol_name);
103 std::cout <<
"Molecule name not reconized defaulting to H2"
105 mol = detail::get_molecule(
"H2");
109 std::cout <<
"Molecule name is empty defaulting to H2" << std::endl;
110 mol = detail::get_molecule(
"H2");
118 get_basis(
const string &basis_name,
const R<Molecule> &mol){
122 if(!basis_name.empty()){
123 basis = detail::get_basis(basis_name, mol);
126 std::cout <<
"Basis name empty defaulting to STO-3G" << std::endl;
127 basis = detail::get_basis(
"STO-3G", mol);
137 get_integral_factory(
int argc,
char** argv){