Skip to content
Open
5 changes: 5 additions & 0 deletions BaseOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ Sandeep Sharma and Garnet K.-L. Chan
#include <cmath>
#include <boost/function.hpp>
#include <boost/functional.hpp>
#if __has_include("boost/bind/bind.hpp")
#include <boost/bind/bind.hpp>
using namespace boost::placeholders;
#else
#include <boost/bind.hpp>
#endif
#include <boostutils.h>
#include "SpinQuantum.h"
#include "ObjectMatrix.h"
Expand Down
5 changes: 5 additions & 0 deletions btas/include/btas/btas.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
// C++11 involves these classes, however, they're not supported by boost serialization.
// They should be replaced by STL library in the future.
#include <boost/function.hpp>
#if __has_include("boost/bind/bind.hpp")
#include <boost/bind/bind.hpp>
using namespace boost::placeholders;
#else
#include <boost/bind.hpp>
#endif
#include <boost/shared_ptr.hpp>

#include <iostream>
Expand Down
5 changes: 5 additions & 0 deletions genetic/GAOptimize.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
using namespace std;

#include <boost/function.hpp>
#if __has_include("boost/bind/bind.hpp")
#include <boost/bind/bind.hpp>
using namespace boost::placeholders;
#else
#include <boost/bind.hpp>
#endif

#ifndef SERIAL
#include <boost/mpi.hpp>
Expand Down
11 changes: 11 additions & 0 deletions input.C
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ void SpinAdapted::Input::initialize_defaults()
m_orbformat=MOLPROFORM;

m_warmup = LOCAL0;

m_orz3rdmalt1 = -1;
m_orz3rdmalt2 = -1;
}

void SpinAdapted::Input::usedkey_error(string& key, string& line) {
Expand Down Expand Up @@ -1197,6 +1200,12 @@ If 2 spins are given, the calculations of transition density matrix between wave
m_reset_iterations = true;
}

else if(boost::iequals(keyword, "orz3rdmalt") )
{
m_orz3rdmalt1 = atoi(tok[1].c_str());
m_orz3rdmalt2 = atoi(tok[2].c_str());
}

else
{
pout << "Unrecognized option :: " << keyword << endl;
Expand Down Expand Up @@ -1252,6 +1261,8 @@ If 2 spins are given, the calculations of transition density matrix between wave
mpi::broadcast(world, m_load_prefix, 0);
mpi::broadcast(world, m_save_prefix, 0);
mpi::broadcast(world, m_calc_type, 0);
mpi::broadcast(world, m_orz3rdmalt1, 0);
mpi::broadcast(world, m_orz3rdmalt2, 0);
#endif

//make the scratch files
Expand Down
10 changes: 10 additions & 0 deletions input.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ Sandeep Sharma and Garnet K.-L. Chan
#include "SpinQuantum.h"
#include "timer.h"
#include "couplingCoeffs.h"
#if __has_include("boost/tr1/unordered_map.hpp")
#include <boost/tr1/unordered_map.hpp>
#else
#include <unordered_map>
#endif
#include "IntegralMatrix.h"


Expand Down Expand Up @@ -205,6 +209,9 @@ class Input {
int m_kept_nevpt2_states;
pair<bool,int> NevPrint;

int m_orz3rdmalt1;
int m_orz3rdmalt2;

friend class boost::serialization::access;
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
Expand Down Expand Up @@ -234,6 +241,7 @@ class Input {
ar & n_twodot_noise & m_twodot_noise & m_twodot_gamma & m_guessState;
ar & m_calc_ri_4pdm & m_store_ripdm_readable & m_nevpt2 & m_conventional_nevpt2 & m_kept_nevpt2_states & NevPrint;
ar & m_act_size & m_core_size & m_virt_size & m_total_orbs & m_total_spin_orbs_symmetry & m_total_spatial_to_spin & m_total_spin_to_spatial;
ar & m_orz3rdmalt1 & m_orz3rdmalt2;
}


Expand Down Expand Up @@ -572,6 +580,8 @@ class Input {
const bool &npdm_intermediate() const { return m_npdm_intermediate; }
bool &npdm_multinode() { return m_npdm_multinode; }
const bool &npdm_multinode() const { return m_npdm_multinode; }
int orz3rdmalt1() const { return m_orz3rdmalt1; }
int orz3rdmalt2() const { return m_orz3rdmalt2; }
};
}
#endif
2 changes: 2 additions & 0 deletions modules/ds0_onepdm/ds0_sweep.C
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ double do_one(SweepParams &sweepParams, const bool &warmUp, const bool &forward,
save_onepdm_spatial_text(onepdm, state, stateB);
save_onepdm_text(onepdm, state, stateB);
save_onepdm_spatial_binary(onepdm, state, stateB);

return sweepParams.get_lowest_energy()[0];
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions modules/ds1_onepdm/ds1_sweep.C
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ double do_one(SweepParams &sweepParams, const bool &warmUp, const bool &forward,
save_onepdm_spatial_text(onepdm, state, stateB);
save_onepdm_text(onepdm, state, stateB);
save_onepdm_spatial_binary(onepdm, state, stateB);

return sweepParams.get_lowest_energy()[0];
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion modules/npdm/fourpdm_container.C
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void Fourpdm_container::external_sort_index(const int &i, const int &j)
}
long outputbuffsize=sorting_buff*4;
long outputbuff_position = 0;
Sortpdm::batch_index outputbuff[outputbuffsize];
Sortpdm::batch_index *outputbuff = new Sortpdm::batch_index[outputbuffsize];
for(;;){
// select the smallest one in the current positions of different caches.
int smallest = 0;
Expand All @@ -230,6 +230,7 @@ void Fourpdm_container::external_sort_index(const int &i, const int &j)
}
fclose(outputfile);
//Finish external sort of index.
delete [] outputbuff;

//Clean up.
for(int p=0; p< world.size();p++){
Expand Down
Loading