Skip to content

Commit

Permalink
Merge pull request #75 from shiozaki/active
Browse files Browse the repository at this point in the history
Active
  • Loading branch information
shiozaki authored Feb 8, 2018
2 parents ed59023 + 45efda4 commit cfa46a3
Show file tree
Hide file tree
Showing 60 changed files with 3,576 additions and 5,354 deletions.
7 changes: 4 additions & 3 deletions src/ci/fci/distfci.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ class DistFCI : public FCI_base {
// rdm ci derivatives
std::shared_ptr<Dvec> rdm1deriv(const int istate) const override;
std::shared_ptr<Dvec> rdm2deriv(const int istate) const override;
std::shared_ptr<Matrix> rdm2deriv_offset(const int istate, const size_t dsize, const size_t offset, const bool parallel = true) const override;
std::tuple<std::shared_ptr<Matrix>,std::shared_ptr<Matrix>,std::shared_ptr<Matrix>>
rdm3deriv(const int istate, std::shared_ptr<const Matrix> fock, const size_t offset, const size_t size, std::shared_ptr<const Matrix> fock_ebra_in) const override;
std::shared_ptr<Matrix> rdm2fderiv(const int istate, std::shared_ptr<const Matrix> fock, std::shared_ptr<const Matrix> dmat) const override;
std::shared_ptr<Matrix> rdm2deriv_offset(const int istate, const size_t dsize, const size_t offset, std::shared_ptr<const Matrix> dmat, const bool parallel = true) const override;
std::tuple<std::shared_ptr<Matrix>,std::shared_ptr<Matrix>>
rdm3deriv(const int istate, std::shared_ptr<const Matrix> fock, const size_t offset, const size_t size, std::shared_ptr<const Matrix> dbra_in, std::shared_ptr<const Matrix> fock_ebra_in) const override;

std::shared_ptr<const CIWfn> conv_to_ciwfn() const override;
std::shared_ptr<const Dvec> conv_to_dvec() const;
Expand Down
18 changes: 14 additions & 4 deletions src/ci/fci/distfci_rdm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,26 @@ shared_ptr<Dvec> DistFCI::rdm1deriv(const int istate) const {


shared_ptr<Dvec> DistFCI::rdm2deriv(const int istate) const {
throw logic_error("DistFCI::rdm2deriv is not implemented yet...");
return nullptr;
}


shared_ptr<Matrix> DistFCI::rdm2deriv_offset(const int istate, const size_t dsize, const size_t offset, const bool parallel) const {
shared_ptr<Matrix> DistFCI::rdm2fderiv(const int istate, shared_ptr<const Matrix> fock, shared_ptr<const Matrix> dmat) const {
throw logic_error("DistFCI::rdm2fderiv is not implemented yet...");
return nullptr;
}


tuple<shared_ptr<Matrix>,shared_ptr<Matrix>,shared_ptr<Matrix>>
DistFCI::rdm3deriv(const int istate, shared_ptr<const Matrix> fock, const size_t offset, const size_t size, shared_ptr<const Matrix> fock_ebra_in) const {
return tuple<shared_ptr<Matrix>,shared_ptr<Matrix>,shared_ptr<Matrix>>();
shared_ptr<Matrix> DistFCI::rdm2deriv_offset(const int istate, const size_t dsize, const size_t offset, shared_ptr<const Matrix> dmat, const bool parallel) const {
throw logic_error("DistFCI::rdm2deriv_offset is not implemented yet...");
return nullptr;
}


tuple<shared_ptr<Matrix>,shared_ptr<Matrix>>
DistFCI::rdm3deriv(const int istate, shared_ptr<const Matrix> fock, const size_t offset, const size_t size, shared_ptr<const Matrix> dbra_in, shared_ptr<const Matrix> fock_ebra_in) const {
throw logic_error("DistFCI::rdm3deriv is not implemented yet...");
return tuple<shared_ptr<Matrix>,shared_ptr<Matrix>>();
}

7 changes: 4 additions & 3 deletions src/ci/fci/fci.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ class FCI : public FCI_base {
// rdm ci derivatives
std::shared_ptr<Dvec> rdm1deriv(const int istate) const override;
std::shared_ptr<Dvec> rdm2deriv(const int istate) const override;
std::shared_ptr<Matrix> rdm2deriv_offset(const int istate, const size_t dsize, const size_t offset, const bool parallel = true) const override;
std::tuple<std::shared_ptr<Matrix>, std::shared_ptr<Matrix>, std::shared_ptr<Matrix>>
rdm3deriv(const int istate, std::shared_ptr<const Matrix> fock, const size_t offset, const size_t size, std::shared_ptr<const Matrix> fock_ebra_in) const override;
std::shared_ptr<Matrix> rdm2fderiv(const int istate, std::shared_ptr<const Matrix> fock, std::shared_ptr<const Matrix> dmat) const override;
std::shared_ptr<Matrix> rdm2deriv_offset(const int istate, const size_t dsize, const size_t offset, std::shared_ptr<const Matrix> dmat, const bool parallel = true) const override;
std::tuple<std::shared_ptr<Matrix>, std::shared_ptr<Matrix>>
rdm3deriv(const int istate, std::shared_ptr<const Matrix> fock, const size_t offset, const size_t size, std::shared_ptr<const Matrix> dbra_in, std::shared_ptr<const Matrix> fock_ebra_in) const override;

// functions for RDM computation
void sigma_2a1(std::shared_ptr<const Civec> cc, std::shared_ptr<Dvec> d) const;
Expand Down
7 changes: 4 additions & 3 deletions src/ci/fci/fci_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ class FCI_base : public Method {
// rdm ci derivatives
virtual std::shared_ptr<Dvec> rdm1deriv(const int istate) const = 0;
virtual std::shared_ptr<Dvec> rdm2deriv(const int istate) const = 0;
virtual std::shared_ptr<Matrix> rdm2deriv_offset(const int istate, const size_t dsize, const size_t offset, const bool parallel = true) const = 0;
virtual std::tuple<std::shared_ptr<Matrix>,std::shared_ptr<Matrix>,std::shared_ptr<Matrix>>
rdm3deriv(const int istate, std::shared_ptr<const Matrix> fock, const size_t offset, const size_t size, std::shared_ptr<const Matrix> fock_ebra_in) const = 0;
virtual std::shared_ptr<Matrix> rdm2fderiv(const int istate, std::shared_ptr<const Matrix> fock, std::shared_ptr<const Matrix> dmat) const = 0;
virtual std::shared_ptr<Matrix> rdm2deriv_offset(const int istate, const size_t dsize, const size_t offset, std::shared_ptr<const Matrix> dmat, const bool parallel = true) const = 0;
virtual std::tuple<std::shared_ptr<Matrix>,std::shared_ptr<Matrix>>
rdm3deriv(const int istate, std::shared_ptr<const Matrix> fock, const size_t offset, const size_t size, std::shared_ptr<const Matrix> dbra_in, std::shared_ptr<const Matrix> fock_ebra_in) const = 0;

std::shared_ptr<VecRDM<1>> rdm1() { return rdm1_; }
std::shared_ptr<VecRDM<2>> rdm2() { return rdm2_; }
Expand Down
1 change: 1 addition & 0 deletions src/ci/fci/fci_rdm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ tuple<shared_ptr<RDM<1>>, shared_ptr<RDM<2>>>
return compute_rdm12_last_step(dbra, dket, cbra);
}


tuple<shared_ptr<RDM<1>>, shared_ptr<RDM<2>>>
FCI::compute_rdm12_last_step(shared_ptr<const Dvec> dbra, shared_ptr<const Dvec> dket, shared_ptr<const Civec> cibra) const {

Expand Down
Loading

0 comments on commit cfa46a3

Please sign in to comment.