You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(53) |
Sep
(39) |
Oct
(33) |
Nov
(18) |
Dec
(52) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(36) |
Feb
(58) |
Mar
(86) |
Apr
(36) |
May
(129) |
Jun
(54) |
Jul
(59) |
Aug
(53) |
Sep
(23) |
Oct
(32) |
Nov
(3) |
Dec
(15) |
| 2007 |
Jan
(31) |
Feb
(48) |
Mar
(24) |
Apr
(7) |
May
(83) |
Jun
(49) |
Jul
(6) |
Aug
(38) |
Sep
(35) |
Oct
(58) |
Nov
(41) |
Dec
(72) |
| 2008 |
Jan
(38) |
Feb
(56) |
Mar
(57) |
Apr
(72) |
May
(39) |
Jun
(42) |
Jul
(22) |
Aug
(28) |
Sep
(24) |
Oct
(27) |
Nov
(21) |
Dec
(43) |
| 2009 |
Jan
(67) |
Feb
(46) |
Mar
(43) |
Apr
(37) |
May
(7) |
Jun
|
Jul
(54) |
Aug
(9) |
Sep
(5) |
Oct
(12) |
Nov
(13) |
Dec
(23) |
| 2010 |
Jan
(8) |
Feb
(26) |
Mar
(5) |
Apr
(17) |
May
(12) |
Jun
(15) |
Jul
(9) |
Aug
(23) |
Sep
(37) |
Oct
(29) |
Nov
|
Dec
|
|
From: <ev...@us...> - 2010-10-22 21:01:53
|
Revision: 9581
http://mpqc.svn.sourceforge.net/mpqc/?rev=9581&view=rev
Author: evaleev
Date: 2010-10-22 21:01:47 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
Added method inputs for ccsdf12, romp2, and ump2
Added Paths:
-----------
trunk/mpqc/src/bin/mpqc/validate/input/ccsdf12h2o.in
trunk/mpqc/src/bin/mpqc/validate/input/rmp2ch2.in
trunk/mpqc/src/bin/mpqc/validate/input/ump2ch2.in
Added: trunk/mpqc/src/bin/mpqc/validate/input/ccsdf12h2o.in
===================================================================
--- trunk/mpqc/src/bin/mpqc/validate/input/ccsdf12h2o.in (rev 0)
+++ trunk/mpqc/src/bin/mpqc/validate/input/ccsdf12h2o.in 2010-10-22 21:01:47 UTC (rev 9581)
@@ -0,0 +1,14 @@
+
+molecule:
+ O 0.172 0.000 0.000
+ H 0.745 0.000 0.754
+ H 0.745 0.000 -0.754
+
+optimize: no
+checkpoint: no
+tmpdir: /tmp
+
+method: "CCSD(T)_R12" ( f12 = "stg-3g[1.5]" )
+basis: cc-pVDZ-F12
+auxbasis: cc-pVTZ (uc)
+dfbasis: cc-pVTZ-RI
Added: trunk/mpqc/src/bin/mpqc/validate/input/rmp2ch2.in
===================================================================
--- trunk/mpqc/src/bin/mpqc/validate/input/rmp2ch2.in (rev 0)
+++ trunk/mpqc/src/bin/mpqc/validate/input/rmp2ch2.in 2010-10-22 21:01:47 UTC (rev 9581)
@@ -0,0 +1,12 @@
+
+multiplicity: 3
+molecule:
+ C 0.000 0.000 -0.100
+ H 0.000 0.857 0.596
+ H 0.000 -0.857 0.596
+
+checkpoint: no
+
+method: RMP2
+frozen_docc: 0
+basis: 6-31G*
Added: trunk/mpqc/src/bin/mpqc/validate/input/ump2ch2.in
===================================================================
--- trunk/mpqc/src/bin/mpqc/validate/input/ump2ch2.in (rev 0)
+++ trunk/mpqc/src/bin/mpqc/validate/input/ump2ch2.in 2010-10-22 21:01:47 UTC (rev 9581)
@@ -0,0 +1,11 @@
+
+multiplicity: 3
+molecule:
+ C 0.000 0.000 -0.100
+ H 0.000 0.857 0.596
+ H 0.000 -0.857 0.596
+
+checkpoint: no
+
+method: UMP2
+basis: 6-31G*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-22 20:59:38
|
Revision: 9580
http://mpqc.svn.sourceforge.net/mpqc/?rev=9580&view=rev
Author: evaleev
Date: 2010-10-22 20:59:31 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
Minor documentation update.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/libint2/bounds.h
trunk/mpqc/src/lib/math/mmisc/grid.h
Modified: trunk/mpqc/src/lib/chemistry/qc/libint2/bounds.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/libint2/bounds.h 2010-10-22 20:58:58 UTC (rev 9579)
+++ trunk/mpqc/src/lib/chemistry/qc/libint2/bounds.h 2010-10-22 20:59:31 UTC (rev 9580)
@@ -49,6 +49,7 @@
Log2Bounds() {}
virtual ~Log2Bounds() {}
+ /// computes bound for a given type of integrals
virtual int log2_bound(int sh1, int sh2, int sh3, int sh4) const =0;
static int_bound_t bound_cast(double);
};
@@ -68,7 +69,6 @@
const Ref<IntParams>& params);
~BoundsLibint2();
- /// Implements Log2Bounds::log2_bound()
int log2_bound(int sh1, int sh2, int sh3, int sh4) const;
private:
Modified: trunk/mpqc/src/lib/math/mmisc/grid.h
===================================================================
--- trunk/mpqc/src/lib/math/mmisc/grid.h 2010-10-22 20:58:58 UTC (rev 9579)
+++ trunk/mpqc/src/lib/math/mmisc/grid.h 2010-10-22 20:59:31 UTC (rev 9580)
@@ -195,13 +195,7 @@
<dt><tt>format</tt></dt><dd> The format in which the grid data is to be
written. Currently only guassian_cube format has been implemented:
<ul>
- <li><tt>mpqc</tt>: A very comprehensive format.</li>
<li><tt>gaussian_cube</tt>: The format used by Gaussian.</li>
- <li><tt>vtk2</tt>: This format is usefull for vizualizing the grid
- data with the vtk library. (http://www.vtk.org/)</li>
- <li><tt>mpqc_raw</tt>: A very simple format that contains both the
- coordinates of the grid points and the value of the scalar function
- at each point.</li>
</ul>
</dd>
</dl> */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-22 20:59:04
|
Revision: 9579
http://mpqc.svn.sourceforge.net/mpqc/?rev=9579&view=rev
Author: evaleev
Date: 2010-10-22 20:58:58 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
Compute bounds for G12 integrals.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/libint2/tbintlibint2.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/libint2/tbintlibint2.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/libint2/tbintlibint2.cc 2010-10-22 20:51:21 UTC (rev 9578)
+++ trunk/mpqc/src/lib/chemistry/qc/libint2/tbintlibint2.cc 2010-10-22 20:58:58 UTC (rev 9579)
@@ -193,7 +193,11 @@
# else
case TwoBodyOperSet::G12NC:
{
+ typedef G12NCLibint2 Int2e;
+ typedef BoundsLibint2<Int2e> Bounds;
+ Ref<Bounds> bounds = new Bounds(integral,b1,b2,b3,b4,storage,params);
int2elibint2_ = create_int2e<G12NCLibint2>(integral,b1,b2,b3,b4,storage,params);
+ int2elibint2_->bounds(bounds);
break;
}
# endif
@@ -284,7 +288,11 @@
# else
case TwoBodyOperSet::G12NC:
{
+ typedef G12NCLibint2 Int2e;
+ typedef BoundsLibint2<Int2e> Bounds;
+ Ref<Bounds> bounds = new Bounds(integral,b1,b2,b3,b4,storage,params);
int2elibint2_ = create_int2e<G12NCLibint2>(integral,b1,b2,b3,b4,storage,params);
+ int2elibint2_->bounds(bounds);
break;
}
# endif
@@ -375,7 +383,11 @@
# else
case TwoBodyOperSet::G12NC:
{
+ typedef G12NCLibint2 Int2e;
+ typedef BoundsLibint2<Int2e> Bounds;
+ Ref<Bounds> bounds = new Bounds(integral,b1,b2,b3,b4,storage,params);
int2elibint2_ = create_int2e<G12NCLibint2>(integral,b1,b2,b3,b4,storage,params);
+ int2elibint2_->bounds(bounds);
break;
}
# endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-22 20:51:27
|
Revision: 9578
http://mpqc.svn.sourceforge.net/mpqc/?rev=9578&view=rev
Author: evaleev
Date: 2010-10-22 20:51:21 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
Added OneBodyOneCenterDerivInt::integral and reinitialize
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/basis/obint.cc
trunk/mpqc/src/lib/chemistry/qc/basis/obint.h
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/obint.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/obint.cc 2010-10-22 20:43:19 UTC (rev 9577)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/obint.cc 2010-10-22 20:51:21 UTC (rev 9578)
@@ -938,6 +938,11 @@
return buffer_;
}
+void
+OneBodyDerivInt::reinitialize()
+{
+}
+
/////////////////////////////////////////////////////////////////////////////
// Local Variables:
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/obint.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/obint.h 2010-10-22 20:43:19 UTC (rev 9577)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/obint.h 2010-10-22 20:51:21 UTC (rev 9578)
@@ -446,7 +446,7 @@
virtual void reinitialize();
/// Return the integral factory that was used to create this object.
- Integral *integral() const { return integral_; }
+ Integral *integral() const { return integral_; }
};
// //////////////////////////////////////////////////////////////////////////
@@ -491,6 +491,13 @@
/** Compute the derivative integrals with respect to the given center
and place the result in the buffer returned by buffer(). */
virtual void compute_shell(int ish, int center) = 0;
+
+ /** This is called for one body integrals that take data to let
+ them know that the data they reference has changed. */
+ virtual void reinitialize();
+
+ /// Return the integral factory that was used to create this object.
+ Integral *integral() const { return integral_; }
};
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-22 20:43:25
|
Revision: 9577
http://mpqc.svn.sourceforge.net/mpqc/?rev=9577&view=rev
Author: evaleev
Date: 2010-10-22 20:43:19 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
added OneBodyDerivInt::reinitialize() and implemented OneBodySODerivInt::reinitialize().
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/basis/obint.cc
trunk/mpqc/src/lib/chemistry/qc/basis/obint.h
trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/obint.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/obint.cc 2010-10-22 18:57:05 UTC (rev 9576)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/obint.cc 2010-10-22 20:43:19 UTC (rev 9577)
@@ -869,6 +869,11 @@
return buffer_;
}
+void
+OneBodyDerivInt::reinitialize()
+{
+}
+
///////////////////////////////////////////////////////////////////////
OneBodyOneCenterDerivInt::OneBodyOneCenterDerivInt(Integral *integral,
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/obint.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/obint.h 2010-10-22 18:57:05 UTC (rev 9576)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/obint.h 2010-10-22 20:43:19 UTC (rev 9577)
@@ -441,6 +441,10 @@
and place the result in the buffer returned by buffer(). */
virtual void compute_shell(int ish, int jsh, int center) = 0;
+ /** This is called for one body integrals that take data to let
+ them know that the data they reference has changed. */
+ virtual void reinitialize();
+
/// Return the integral factory that was used to create this object.
Integral *integral() const { return integral_; }
};
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.cc 2010-10-22 18:57:05 UTC (rev 9576)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.cc 2010-10-22 20:43:19 UTC (rev 9577)
@@ -251,6 +251,12 @@
}
}
+void
+OneBodySODerivInt::reinitialize()
+{
+ obd_->reinitialize();
+}
+
/////////////////////////////////////////////////////////////////////////////
// TwoBodySOInt
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-22 18:57:12
|
Revision: 9576
http://mpqc.svn.sourceforge.net/mpqc/?rev=9576&view=rev
Author: evaleev
Date: 2010-10-22 18:57:05 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
Implemented semicanonical HSOSHF densities.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/psi/psiref.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/psi/psiref.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/psi/psiref.cc 2010-10-21 16:58:46 UTC (rev 9575)
+++ trunk/mpqc/src/lib/chemistry/qc/psi/psiref.cc 2010-10-22 18:57:05 UTC (rev 9576)
@@ -93,18 +93,26 @@
PsiSCF_RefWavefunction::ordm(SpinCase1 s) const {
s = valid_spincase(s);
if (!scf_->spin_polarized()) s = Alpha;
- RefSymmSCMatrix result;
+ RefSymmSCMatrix P;
Ref<PsiHSOSHF> hsoshf; hsoshf << scf_;
if (hsoshf.nonnull() && spin_restricted_ == false) { // HSOSHF + spin_unrestricted => must use semicanonical orbitals
- // but secmicanonical densities are not implemented
- throw FeatureNotImplemented("semicanonical densities should not be used", __FILE__, __LINE__, class_desc());
+ // compute semicanonical densities
+ RefSCMatrix C = hsoshf->coefs_semicanonical(s);
+ RefDiagSCMatrix P_mo = C.kit()->diagmatrix(C.coldim()); // density in MO basis
+ P_mo.assign(0.0);
+ const int nmo = P_mo.n();
+ for(int mo=0; mo<nmo; ++mo)
+ P_mo.set_element(mo, (s == Alpha) ? hsoshf->alpha_occupation(mo)
+ : hsoshf->beta_occupation(mo) );
+ P = C.kit()->symmmatrix(C.rowdim()); P.assign(0.0);
+ P.accumulate_transform(C, P_mo);
}
else {
- result = (s == Alpha) ? scf()->alpha_ao_density() : scf()->beta_ao_density();
+ P = (s == Alpha) ? scf()->alpha_ao_density() : scf()->beta_ao_density();
}
- return result;
+ return P;
}
RefSymmSCMatrix
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-21 16:58:52
|
Revision: 9575
http://mpqc.svn.sourceforge.net/mpqc/?rev=9575&view=rev
Author: evaleev
Date: 2010-10-21 16:58:46 +0000 (Thu, 21 Oct 2010)
Log Message:
-----------
Minor changes.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/psi/psicc_pt2r12.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/psi/psicc_pt2r12.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/psi/psicc_pt2r12.cc 2010-10-21 16:58:26 UTC (rev 9574)
+++ trunk/mpqc/src/lib/chemistry/qc/psi/psicc_pt2r12.cc 2010-10-21 16:58:46 UTC (rev 9575)
@@ -249,7 +249,8 @@
_print(spincase2, Via[s], prepend_spincase(spincase2,"Via matrix").c_str());
if (Vai[s].nonnull())
_print(spincase2, Vai[s], prepend_spincase(spincase2,"Vai matrix").c_str());
- _print(spincase2, A[s], prepend_spincase(spincase2,"A matrix").c_str());
+ if (A[s].nonnull())
+ _print(spincase2, A[s], prepend_spincase(spincase2,"A matrix").c_str());
}
if (debug() >= DefaultPrintThresholds::mostO4) {
Vij[s].print(prepend_spincase(spincase2,"Vij matrix").c_str());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-21 16:58:32
|
Revision: 9574
http://mpqc.svn.sourceforge.net/mpqc/?rev=9574&view=rev
Author: evaleev
Date: 2010-10-21 16:58:26 +0000 (Thu, 21 Oct 2010)
Log Message:
-----------
Minor changes.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/mbptr12/r12wfnworld.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/mbptr12/r12wfnworld.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbptr12/r12wfnworld.cc 2010-10-21 16:58:08 UTC (rev 9573)
+++ trunk/mpqc/src/lib/chemistry/qc/mbptr12/r12wfnworld.cc 2010-10-21 16:58:26 UTC (rev 9574)
@@ -174,6 +174,9 @@
bool
R12WavefunctionWorld::sdref() const {
+
+#define ALWAYS_USE_GENREF_ALGORITHM 0
+#if !ALWAYS_USE_GENREF_ALGORITHM
// only references based on OneBodyWavefunction are detected as single-determinant references!
{
Ref<SD_RefWavefunction> sd; sd << ref();
@@ -185,6 +188,7 @@
if (sd.nonnull()) return true;
}
#endif
+#endif
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-21 16:58:14
|
Revision: 9573
http://mpqc.svn.sourceforge.net/mpqc/?rev=9573&view=rev
Author: evaleev
Date: 2010-10-21 16:58:08 +0000 (Thu, 21 Oct 2010)
Log Message:
-----------
Minor changes.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/lmp2/sma.h
Modified: trunk/mpqc/src/lib/chemistry/qc/lmp2/sma.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/lmp2/sma.h 2010-10-20 22:01:54 UTC (rev 9572)
+++ trunk/mpqc/src/lib/chemistry/qc/lmp2/sma.h 2010-10-21 16:58:08 UTC (rev 9573)
@@ -1918,13 +1918,8 @@
for (typename blockmap_t::const_iterator i = blocks_.begin();
i != blocks_.end();
i++) {
- int n = block_size(i->first);
- double *data = i->second;
- for (int j=0; j<n; j++) {
- double tmp = fabs(data[j]);
- if (tmp > max_abs) max_abs = tmp;
- }
- }
+ max_abs = std::max(max_abs, this->block_max_abs(i));
+ }
return max_abs;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-20 19:57:15
|
Revision: 9571
http://mpqc.svn.sourceforge.net/mpqc/?rev=9571&view=rev
Author: evaleev
Date: 2010-10-20 19:57:08 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
Working updates to TwoBodyIntBatch classes and their relatives.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/basis/tbint_batch.h
trunk/mpqc/src/lib/chemistry/qc/basis/tbint_batch_test.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/tbint_batch.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/tbint_batch.h 2010-10-20 16:12:13 UTC (rev 9570)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/tbint_batch.h 2010-10-20 19:57:08 UTC (rev 9571)
@@ -54,65 +54,61 @@
};
}
-/// This is an abstract range of shell sets
-template <int NumCenters>
-class ShellRange:public RefCount {
+/// This is an abstract range of indices
+template <int NDIM>
+class IndexRangeIterator : public RefCount {
public:
- typedef detail::tuple<NumCenters, unsigned int> ShellSet;
+ typedef detail::tuple<NDIM, unsigned int> IntTuple;
- virtual ~ShellRange();
-
/// initialize the iterator
- virtual void start() =0;
+ virtual void init() =0;
/// returns false if there are no more
- virtual bool have_next() =0;
+ virtual bool in_range() const =0;
/// update current
- virtual const ShellSet& next() const =0;
+ virtual void next() =0;
/// current shell set
- virtual const ShellSet& current() const =0;
-
- protected:
- ShellRange();
+ virtual const IntTuple& current() const =0;
};
-/// TensorShellRange is a direct product of shell ranges for each center
-template <int NumCenters>
-class TensorShellRange:public ShellRange<NumCenters> {
+/// TensorIndexRangeIterator is a direct product of shell ranges for each center
+template <int NDIM>
+class TensorIndexRangeIterator : public IndexRangeIterator<NDIM> {
public:
- //typedef typename ShellRange<NumCenters>::ShellSet ShellSet;
- typedef detail::tuple<NumCenters, unsigned int> ShellSet;
+ typedef typename IndexRangeIterator<NDIM>::IntTuple IntTuple;
-
- /// Constructs a [start, fence) ShellRange
- TensorShellRange(const ShellSet& start, const ShellSet& fence) :
- start_(start), fence_(fence), have_next_(false) {
+ /// Constructs a [start, fence) IndexRangeIterator
+ TensorIndexRangeIterator(const IntTuple& start, const IntTuple& fence) :
+ start_(start), fence_(fence), in_range_(false) {
}
- void start() {
- next_ = start_;
+ void init() {
+ current_ = start_;
+ next_ = current_;
// if range is nonempty -- find next
- if (is_nonempty())
+ if (is_nonempty()) {
+ in_range_ = true;
next();
+ }
}
- bool have_next() {
- return have_next_;
+ bool in_range() const {
+ return in_range_;
}
- const ShellSet& next() {
+ void next() {
+ in_range_ = have_next_;
current_ = next_;
have_next_ = inc(next_);
- return current_;
}
- const ShellSet& current() const {
+ const IntTuple& current() const {
return current_;
}
private:
// return true if can increment
- bool inc(ShellSet & s) {
- unsigned int d = NumCenters - 1;
+ bool inc(IntTuple & s) {
+ unsigned int d = NDIM - 1;
++s[d];
while (s[d] >= fence_[d]) {
if (d == 0)
@@ -124,21 +120,20 @@
}
// return true if range is nonempty
bool is_nonempty() {
- for (unsigned int d = 0; d < NumCenters; ++d)
+ for (unsigned int d = 0; d < NDIM; ++d)
if (fence_[d] <= start_[d])
return false;
return true;
}
- ShellSet start_;
- ShellSet fence_;
- ShellSet current_;
- ShellSet next_;
+ IntTuple start_;
+ IntTuple fence_;
+ IntTuple current_;
+ IntTuple next_;
+ bool in_range_;
bool have_next_;
};
-template <int NumCenters> class ShellRange;
-
/** This is an abstract base type for classes that
compute integrals involving two electrons and 2 functions per electron.
*/
@@ -147,7 +142,7 @@
public:
- typedef detail::tuple<NumCenters, unsigned int> ShellSet;
+ typedef detail::tuple<NumCenters, unsigned int> IntTuple;
//TwoBodyIntBatch(Integral *integral,
// const detail::tuple<NumCenters, Ref<GaussianBasisSet> >& bs); // breaks formatting in Eclipse
@@ -169,7 +164,7 @@
/// prepare to iterate using seed s
/// TODO JTF implement
- template <typename Seed> void init(const Ref<ShellRange<NumCenters> >& n, Seed s = Seed());
+ template <typename Seed> void init(const Ref<IndexRangeIterator<NumCenters> >& n, Seed s = Seed());
/// compute next batch, return true if have another
/// may need to be split into have_next and next
@@ -177,7 +172,7 @@
virtual bool next() = 0;
/// returns the shell indices of the current batch
- virtual const std::vector<ShellSet>& current_batch(TwoBodyOper::type type = TwoBodyOper::eri) const = 0;
+ virtual const std::vector<IntTuple>& current_batch() const = 0;
/** The computed shell integrals will be put in the buffer returned
by this member. Some TwoBodyInt specializations have more than
@@ -226,9 +221,9 @@
std::vector<double> buffer_;
- std::vector<ShellSet> shells_in_buffer_;
- std::vector<ShellSet> fao_;
- std::vector<ShellSet> lao_;
+ std::vector<IntTuple> shells_in_buffer_;
+ std::vector<IntTuple> start_;
+ std::vector<IntTuple> fence_;
size_t buf_cap_ ;
};
@@ -238,7 +233,8 @@
template <int NumCenters>
class TwoBodyIntBatchGeneric:public TwoBodyIntBatch<NumCenters> {
- typedef detail::tuple<NumCenters, unsigned int> ShellSet;
+ typedef TensorIndexRangeIterator<NumCenters> SRange;
+ typedef typename SRange::IntTuple IntTuple;
public:
typedef typename TwoBodyIntEvalType<NumCenters>::value TwoBodyIntEval;
@@ -248,9 +244,8 @@
}
// TwoBodyIntBatchGeneric(Integral *i, const detail::tuple<NumCenters, Ref<GaussianBasisSet> >& b) :
- TwoBodyIntBatchGeneric(Ref<Integral> i) :
- TwoBodyIntBatch<NumCenters>(i), tbint_(i->electron_repulsion()), basis_(tbint_->basis()) {
- //tbint_(i->electron_repulsion()), basis_(tbint_->basis()) {
+ TwoBodyIntBatchGeneric(Ref<TwoBodyIntEval> tbint) :
+ TwoBodyIntBatch<NumCenters>(tbint->integral()), tbint_(tbint) {
in_buf_ = tbint_->buffer();
@@ -261,8 +256,7 @@
}
Ref<TwoBodyIntBatch<NumCenters> > clone() {
- TwoBodyIntBatchGeneric h(this->integral_);
- return &h;
+ return new TwoBodyIntBatchGeneric<NumCenters>(this->tbint_->clone());
}
TwoBodyOperSet::type type() const {
@@ -278,27 +272,24 @@
this->shells_in_buffer_.reserve(storage); // this seems dumb; but no other way to guarantee enough room (all <ss|ss>?)
}
- const std::vector<ShellSet>& current_batch(TwoBodyOper::type type = TwoBodyOper::eri) const {
- if ( type != TwoBodyOper::eri ) {
- exit(1);
- }
+ const std::vector<IntTuple>& current_batch() const {
return this->shells_in_buffer_ ;
}
- const std::vector<ShellSet>& fao(){
- return this->fao_ ;
+ const std::vector<IntTuple>& start(){
+ return this->start_ ;
}
- const std::vector<ShellSet>& lao(){
- return this->lao_ ;
+ const std::vector<IntTuple>& fence(){
+ return this->fence_ ;
}
const double * buffer(TwoBodyOper::type type = TwoBodyOper::eri) const {
return in_buf_;
}
- template <unsigned int> void init(const Ref<ShellRange<NumCenters> >& i, int s = int()) {
+ template <unsigned int> void init(const Ref<IndexRangeIterator<NumCenters> >& i, int s = int()) {
//
int sp;
sr_(i);
@@ -318,7 +309,7 @@
private:
const Ref<TwoBodyIntEval> tbint_;
- const Ref<TensorShellRange<NumCenters> > sr_;
+ const Ref<SRange > sr_;
const double *in_buf_;
const Ref<GaussianBasisSet> basis_;
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/tbint_batch_test.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/tbint_batch_test.cc 2010-10-20 16:12:13 UTC (rev 9570)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/tbint_batch_test.cc 2010-10-20 19:57:08 UTC (rev 9571)
@@ -284,14 +284,14 @@
throw FeatureNotImplemented("C1 symmetry only", __FILE__, __LINE__,
class_desc());
}
- typedef detail::tuple<4, unsigned int> ShellSet;
+ typedef detail::tuple<4, unsigned int> IntTuple;
RefSCMatrix vec = ref_mp2_wfn_->eigenvectors();
//Int_Batch batch(1024, integral()->electron_repulsion());
//TwoBodyIntBatchGeneric<4> *batch = new TwoBodyIntBatchGeneric<4>( integral()->electron_repulsion() );
- TwoBodyIntBatchGeneric<4> batch(integral());
+ TwoBodyIntBatchGeneric<4> batch(integral()->electron_repulsion());
int nao = vec.nrow();
int nmo = vec.ncol();
@@ -381,47 +381,35 @@
int index = 0;
// jf OK
- std::vector<ShellSet> sib = batch.current_batch(); // shells in this batch
- std::vector<ShellSet>::iterator it;
+ std::vector<IntTuple> sib = batch.current_batch(); // shells in this batch
+ std::vector<IntTuple>::iterator it;
// jf OK
- for (it=sib.begin(), i=0; it<sib.end(); it++, i++) {
+ for (it = sib.begin(), i = 0; it < sib.end(); it++, i++) {
- ShellSet cs = *it;
- ShellSet p;
- ShellSet p_i = batch.fao()[i];
- ShellSet p_l = batch.lao()[i];
+ IntTuple start = batch.start()[i];
+ IntTuple fence = batch.fence()[i];
+ TensorIndexRangeIterator<4> function_range(start, fence);
// do 4-index transformation
- // may be better to implement as one loop over (index=0; < nint=p_l[0]*p_l[1]...)
- // that would require computing values of p, q, r, s from p_i and index - much harder, I think
- for (p[0] = p_i[0]; p[0] < p_i[0] + p_l[0]; p[0]++) {
- int po = p[0]*nmo;
- for (p[1] = p_i[1]; p[1] < p_i[1] + p_l[1]; p[1]++) {
- int qo = p[1]*nmo;
- for (p[2]= p_i[2]; p[2] < p_i[2] + p_l[2]; p[2]++) {
- int ro = p[2]*nmo;
- for (p[3]= p_i[3]; p[3] < p_i[3] + p_l[3]; p[3]++, index++) {
- int so = p[3]*nmo;
- int idx = 0;
- // at this point, user has information and access to:
- // p, q, r, s indices as p[]
- // integral value at pqrs[idx] note lack of permutational symmetry, etc.
- // offsets po, etc., for locating position in mo coefficient matrix cvec.
- for (int i = 0; i < nmo; i++) {
- for (int j = 0; j < nmo; j++) {
- for (int k = 0; k < nmo; k++) {
- for (int l = 0; l < nmo; l++, idx++) {
+ for (function_range.init();
+ function_range.in_range();
+ function_range.next(), ++index) {
+ const IntTuple& current = function_range.current();
+ // at this point, user has information and access to:
+ // p, q, r, s indices as p[]
+ // integral value at pqrs[idx] note lack of permutational symmetry, etc.
+ // offsets po, etc., for locating position in mo coefficient matrix cvec.
+ int mo_4idx = 0;
+ for (int i = 0; i < nmo; i++) {
+ for (int j = 0; j < nmo; j++) {
+ for (int k = 0; k < nmo; k++) {
+ for (int l = 0; l < nmo; l++, mo_4idx++) {
- // place each ao integral in the batch into the mo integral ijkl[idx]
- ijkl[idx] += cvec[po + i] *
- cvec[qo + j] *
- cvec[ro + k] *
- cvec[so + l] * pqrs[index];
+ // place each ao integral in the batch into the mo integral ijkl[idx]
+ ijkl[mo_4idx] += cvec[current[0]*nmo + i] * cvec[current[1]*nmo + j] * cvec[current[2]*nmo + k]
+ * cvec[current[3]*nmo + l] * pqrs[index];
- }
- }
- }
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-20 16:12:19
|
Revision: 9570
http://mpqc.svn.sourceforge.net/mpqc/?rev=9570&view=rev
Author: evaleev
Date: 2010-10-20 16:12:13 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
1) added TwoBodyIntDeriv::integral()
2) added stub TwoBodySODerivInt (to be implemented by Justin)
3) updated documentation for SOBasis.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/basis/sobasis.h
trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.cc
trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.h
trunk/mpqc/src/lib/chemistry/qc/basis/tbint.h
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/sobasis.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/sobasis.h 2010-10-20 16:09:26 UTC (rev 9569)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/sobasis.h 2010-10-20 16:12:13 UTC (rev 9570)
@@ -86,11 +86,16 @@
};
/** A SOBasis object describes the transformation from an atomic orbital
- basis to a symmetry orbital basis. */
+ basis to a symmetry orbital basis. The cental concept here is "SO shell".
+ An SO shell is defined as a collection of symmetry-adapated basis functions that
+ arise from one set of AO shells related by symmetry (an AO shell orbit).
+ Thus the number of SO shells = the number of symmetry-unique AO shells,
+ and each SO shell contains basis functions of potentially several symmetries.
+ */
class SOBasis : public RefCount {
protected:
Ref<GaussianBasisSet> basis_;
- int nshell_;
+ int nshell_; //< number of unique AO shells
int nirrep_;
int *ncomp_;
int **nfunc_;
@@ -143,7 +148,7 @@
int function_within_irrep(int ishell, int ifunc) const;
/// Return the SOTransform object for the given shell.
- const SOTransform &trans(int i) const { return trans_[i]; }
+ const SOTransform &trans(int ishell) const { return trans_[ishell]; }
void print(std::ostream &o=ExEnv::out0()) const;
};
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.cc 2010-10-20 16:09:26 UTC (rev 9569)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.cc 2010-10-20 16:12:13 UTC (rev 9570)
@@ -30,6 +30,7 @@
#endif
#include <util/misc/formio.h>
+#include <util/class/scexception.h>
#include <chemistry/qc/basis/sointegral.h>
using namespace std;
@@ -298,7 +299,168 @@
}
}
+/////////////////////////////////////////////////////////////////////////////
+// TwoBodySODerivInt
+TwoBodySODerivInt::TwoBodySODerivInt(const Ref<TwoBodyDerivInt> &tb)
+{
+ throw FeatureNotImplemented("Justin, get on it!", __FILE__, __LINE__);
+ tb_ = tb;
+
+ b1_ = new SOBasis(tb->basis1(), tb->integral());
+
+ if (tb->basis2() == tb->basis1()) b2_ = b1_;
+ else b2_ = new SOBasis(tb->basis2(), tb->integral());
+
+ if (tb->basis3() == tb->basis1()) b3_ = b1_;
+ else if (tb->basis3() == tb->basis2()) b3_ = b2_;
+ else b3_ = new SOBasis(tb->basis3(), tb->integral());
+
+ if (tb->basis4() == tb->basis1()) b4_ = b1_;
+ else if (tb->basis4() == tb->basis2()) b4_ = b2_;
+ else if (tb->basis4() == tb->basis3()) b4_ = b3_;
+ else b4_ = new SOBasis(tb->basis4(), tb->integral());
+
+ redundant_ = 1;
+ only_totally_symmetric_ = 0;
+
+ const int num_salc_coords = 12 * tb->basis1()->molecule()->point_group()->order();
+
+ buffer_ = new double[b1_->max_nfunction_in_shell()
+ *b2_->max_nfunction_in_shell()
+ *b3_->max_nfunction_in_shell()
+ *b4_->max_nfunction_in_shell()
+ * num_salc_coords ];
+}
+
+TwoBodySODerivInt::~TwoBodySODerivInt()
+{
+ delete[] buffer_;
+}
+
+Ref<SOBasis>
+TwoBodySODerivInt::basis() const
+{
+ return b1_;
+}
+
+Ref<SOBasis>
+TwoBodySODerivInt::basis1() const
+{
+ return b1_;
+}
+
+Ref<SOBasis>
+TwoBodySODerivInt::basis2() const
+{
+ return b2_;
+}
+
+Ref<SOBasis>
+TwoBodySODerivInt::basis3() const
+{
+ return b3_;
+}
+
+Ref<SOBasis>
+TwoBodySODerivInt::basis4() const
+{
+ return b4_;
+}
+
+void
+TwoBodySODerivInt::compute_shell(int ish, int jsh, int ksh, int lsh)
+{
+ // TODO figure out if we need this here tb_->set_redundant(1);
+ const double *aobuf = tb_->buffer();
+
+ const SOTransform &t1 = b1_->trans(ish);
+ const SOTransform &t2 = b2_->trans(jsh);
+ const SOTransform &t3 = b3_->trans(ksh);
+ const SOTransform &t4 = b4_->trans(lsh);
+
+ int nso1 = b1_->nfunction(ish);
+ int nso2 = b2_->nfunction(jsh);
+ int nso3 = b3_->nfunction(ksh);
+ int nso4 = b4_->nfunction(lsh);
+
+ memset(buffer_, 0, nso1*nso2*nso3*nso4*sizeof(double));
+
+ int nao2 = b2_->naofunction(jsh);
+ int nao3 = b3_->naofunction(ksh);
+ int nao4 = b4_->naofunction(lsh);
+
+ // loop through the ao shells that make up this so shell
+ for (int i=0; i<t1.naoshell; i++) {
+ const SOTransformShell &s1 = t1.aoshell[i];
+ for (int j=0; j<t2.naoshell; j++) {
+ const SOTransformShell &s2 = t2.aoshell[j];
+ for (int k=0; k<t3.naoshell; k++) {
+ const SOTransformShell &s3 = t3.aoshell[k];
+ for (int l=0; l<t4.naoshell; l++) {
+ const SOTransformShell &s4 = t4.aoshell[l];
+ //tb_->compute_shell(s1.aoshell, s2.aoshell, s3.aoshell, s4.aoshell);
+ for (int itr=0; itr<s1.nfunc; itr++) {
+ const SOTransformFunction &ifunc = s1.func[itr];
+ double icoef = ifunc.coef;
+ int iaofunc = ifunc.aofunc;
+ int isofunc = b1_->function_offset_within_shell(ish,
+ ifunc.irrep)
+ + ifunc.sofunc;
+ int iaooff = iaofunc;
+ int isooff = isofunc;
+ for (int jtr=0; jtr<s2.nfunc; jtr++) {
+ const SOTransformFunction &jfunc = s2.func[jtr];
+ double jcoef = jfunc.coef * icoef;
+ int jaofunc = jfunc.aofunc;
+ int jsofunc = b2_->function_offset_within_shell(jsh,
+ jfunc.irrep)
+ + jfunc.sofunc;
+ int jaooff = iaooff*nao2 + jaofunc;
+ int jsooff = isooff*nso2 + jsofunc;
+ for (int ktr=0; ktr<s3.nfunc; ktr++) {
+ const SOTransformFunction &kfunc = s3.func[ktr];
+ double kcoef = kfunc.coef * jcoef;
+ int kaofunc = kfunc.aofunc;
+ int ksofunc = b3_->function_offset_within_shell(ksh,
+ kfunc.irrep)
+ + kfunc.sofunc;
+ int kaooff = jaooff*nao3 + kaofunc;
+ int ksooff = jsooff*nso3 + ksofunc;
+ for (int ltr=0; ltr<s4.nfunc; ltr++) {
+ const SOTransformFunction &lfunc = s4.func[ltr];
+ double lcoef = lfunc.coef * kcoef;
+ int laofunc = lfunc.aofunc;
+ int lsofunc = b4_->function_offset_within_shell(lsh,
+ lfunc.irrep)
+ + lfunc.sofunc;
+ int laooff = kaooff*nao4 + laofunc;
+ int lsooff = ksooff*nso4 + lsofunc;
+ buffer_[lsooff] += lcoef * aobuf[laooff];
+#if DEBUG
+ if (fabs(aobuf[laooff]*lcoef) > 1.0e-10) {
+ ExEnv::outn() <<"("<<isofunc<<jsofunc
+ <<"|"<<ksofunc<<lsofunc
+ <<") += "<<scprintf("%8.5f",lcoef)<<" * "
+ <<"("<<iaofunc<<jaofunc
+ <<"|"<<kaofunc<<laofunc
+ <<"): "
+ <<scprintf("%8.5f -> %8.5f",
+ aobuf[laooff], buffer_[lsooff])
+ << endl;
+ }
+#endif
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
/////////////////////////////////////////////////////////////////////////////
// Local Variables:
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.h 2010-10-20 16:09:26 UTC (rev 9569)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/sointegral.h 2010-10-20 16:12:13 UTC (rev 9570)
@@ -38,6 +38,8 @@
namespace sc {
+/** OneBodySOInt computes two-center one-electron integrals in a symmetry-adapted basis
+ */
class OneBodySOInt : public RefCount {
protected:
Ref<OneBodyInt> ob_;
@@ -56,9 +58,13 @@
Ref<SOBasis> basis1() const;
Ref<SOBasis> basis2() const;
+ /// TODO document OneBodySOInt::buffer()
const double * buffer() const { return buffer_; }
- virtual void compute_shell(int,int);
+ /// computes an SO shell doublet of integrals
+ /// @param so_shell1 the SO shell index for center 1, so_shell1 \f$ \in \f$ [ 0, this->basis1()->nshell() )
+ /// @param so_shell2 the SO shell index for center 2, so_shell1 \f$ \in \f$ [ 0, this->basis2()->nshell() )
+ virtual void compute_shell(int so_shell1, int so_shell2);
// an index of -1 for a shell indicates any shell
//virtual int log2_shell_bound(int= -1,int= -1) = 0;
@@ -70,7 +76,8 @@
};
-
+/** TwoBodySOInt computes four-center two-electron integrals in a symmetry-adapted basis
+ */
class TwoBodySOInt : public RefCount {
protected:
Ref<TwoBodyInt> tb_;
@@ -94,9 +101,15 @@
Ref<SOBasis> basis3() const;
Ref<SOBasis> basis4() const;
+ /// TODO document TwoBodySOInt::buffer()
const double * buffer() const { return buffer_; }
- virtual void compute_shell(int,int,int,int);
+ /// computes an SO shell quartet of integrals
+ /// @param so_shell1 the SO shell index for center 1, so_shell1 \f$ \in \f$ [ 0, this->basis1()->nshell() )
+ /// @param so_shell2 the SO shell index for center 2, so_shell1 \f$ \in \f$ [ 0, this->basis2()->nshell() )
+ /// @param so_shell3 the SO shell index for center 3, so_shell1 \f$ \in \f$ [ 0, this->basis3()->nshell() )
+ /// @param so_shell4 the SO shell index for center 4, so_shell1 \f$ \in \f$ [ 0, this->basis4()->nshell() )
+ virtual void compute_shell(int so_shell1, int so_shell2, int so_shell3, int so_shell4);
// an index of -1 for a shell indicates any shell
//virtual int log2_shell_bound(int= -1,int= -1,int= -1,int= -1) = 0;
@@ -111,6 +124,54 @@
void set_only_totally_symmetric(int i) { only_totally_symmetric_ = i; }
};
+/** TwoBodySODerivInt computes four-center two-electron derivative integrals in a symmetry-adapted basis
+ */
+class TwoBodySODerivInt : public RefCount {
+ protected:
+ Ref<TwoBodyDerivInt> tb_;
+
+ Ref<SOBasis> b1_;
+ Ref<SOBasis> b2_;
+ Ref<SOBasis> b3_;
+ Ref<SOBasis> b4_;
+
+ double *buffer_;
+
+ int redundant_;
+ int only_totally_symmetric_;
+ public:
+ TwoBodySODerivInt(const Ref<TwoBodyDerivInt> &);
+ virtual ~TwoBodySODerivInt();
+
+ Ref<SOBasis> basis() const;
+ Ref<SOBasis> basis1() const;
+ Ref<SOBasis> basis2() const;
+ Ref<SOBasis> basis3() const;
+ Ref<SOBasis> basis4() const;
+
+ /// TODO document TwoBodySODerivInt::buffer()
+ const double * buffer() const { return buffer_; }
+
+ /// computes an SO shell quartet of derivative integrals
+ /// @param so_shell1 the SO shell index for center 1, so_shell1 \f$ \in \f$ [ 0, this->basis1()->nshell() )
+ /// @param so_shell2 the SO shell index for center 2, so_shell1 \f$ \in \f$ [ 0, this->basis2()->nshell() )
+ /// @param so_shell3 the SO shell index for center 3, so_shell1 \f$ \in \f$ [ 0, this->basis3()->nshell() )
+ /// @param so_shell4 the SO shell index for center 4, so_shell1 \f$ \in \f$ [ 0, this->basis4()->nshell() )
+ virtual void compute_shell(int so_shell1, int so_shell2, int so_shell3, int so_shell4);
+
+ // an index of -1 for a shell indicates any shell
+ //virtual int log2_shell_bound(int= -1,int= -1,int= -1,int= -1) = 0;
+
+ // if redundant is true, then keep redundant integrals in buffer_. The
+ // default is true.
+ int redundant() const { return redundant_; }
+ // cannot do nonredundant at the moment
+ //void set_redundant(int i) { redundant_ = i; }
+
+ int only_totally_symmetric() const { return only_totally_symmetric_; }
+ void set_only_totally_symmetric(int i) { only_totally_symmetric_ = i; }
+};
+
}
#endif
Modified: trunk/mpqc/src/lib/chemistry/qc/basis/tbint.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/basis/tbint.h 2010-10-20 16:09:26 UTC (rev 9569)
+++ trunk/mpqc/src/lib/chemistry/qc/basis/tbint.h 2010-10-20 16:12:13 UTC (rev 9570)
@@ -602,6 +602,10 @@
/** Return the maximum magnitude of any integral in a
shell block. An index of -1 for any argument indicates any shell. */
double shell_bound(int= -1,int= -1,int= -1,int= -1);
+
+ /// Return the integral factory that was used to create this object.
+ Integral *integral() const { return integral_; }
+
};
// //////////////////////////////////////////////////////////////////////////
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-20 16:09:32
|
Revision: 9569
http://mpqc.svn.sourceforge.net/mpqc/?rev=9569&view=rev
Author: evaleev
Date: 2010-10-20 16:09:26 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
Added PointGroup::order().
Modified Paths:
--------------
trunk/mpqc/src/lib/math/symmetry/pointgrp.h
Modified: trunk/mpqc/src/lib/math/symmetry/pointgrp.h
===================================================================
--- trunk/mpqc/src/lib/math/symmetry/pointgrp.h 2010-10-20 00:32:45 UTC (rev 9568)
+++ trunk/mpqc/src/lib/math/symmetry/pointgrp.h 2010-10-20 16:09:26 UTC (rev 9569)
@@ -493,6 +493,9 @@
PointGroup& operator=(const PointGroup&);
+ /// returns the order of the point group
+ int order() const { return char_table().order(); }
+
/// Returns 1 if the point groups are equivalent, 0 otherwise.
int equiv(const Ref<PointGroup> &, double tol = 1.0e-6) const;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-11 20:18:09
|
Revision: 9554
http://mpqc.svn.sourceforge.net/mpqc/?rev=9554&view=rev
Author: evaleev
Date: 2010-10-11 20:17:59 +0000 (Mon, 11 Oct 2010)
Log Message:
-----------
Same-spin CC T2 amplitudes were not read correctly from Psi if reference = rhf.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/psi/psicc.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/psi/psicc.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/psi/psicc.cc 2010-10-11 02:43:08 UTC (rev 9553)
+++ trunk/mpqc/src/lib/chemistry/qc/psi/psicc.cc 2010-10-11 20:17:59 UTC (rev 9554)
@@ -206,7 +206,7 @@
}
// Grab T matrices
- const char* kwd = (spin2 != AlphaBeta && reftype != PsiSCF::rhf) ? (spin2 == AlphaAlpha ? "tIJAB (IJ,AB)" : "tijab (ij,ab)") : "tIjAb";
+ const char* kwd = (spin2 != AlphaBeta) ? (spin2 == AlphaAlpha ? "tIJAB (IJ,AB)" : "tijab (ij,ab)") : "tIjAb";
T2_da4_[spin2] = T2_distarray4(spin2, kwd);
return T2_da4_[spin2];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-11 02:43:14
|
Revision: 9553
http://mpqc.svn.sourceforge.net/mpqc/?rev=9553&view=rev
Author: evaleev
Date: 2010-10-11 02:43:08 +0000 (Mon, 11 Oct 2010)
Log Message:
-----------
Fixed linking errors introduced in the previous commit.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/wfn/orbital.cc
trunk/mpqc/src/lib/chemistry/qc/wfn/orbital.h
Modified: trunk/mpqc/src/lib/chemistry/qc/wfn/orbital.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/wfn/orbital.cc 2010-10-10 15:26:33 UTC (rev 9552)
+++ trunk/mpqc/src/lib/chemistry/qc/wfn/orbital.cc 2010-10-11 02:43:08 UTC (rev 9553)
@@ -75,8 +75,8 @@
{
}
+Orbital::~Orbital() {}
-
void
Orbital::compute()
{
@@ -151,6 +151,8 @@
}
}
+WriteOrbital::~WriteOrbital() {}
+
void
WriteOrbital::label(char* buffer)
{
@@ -169,7 +171,8 @@
return obwfn_->orbital(point, orbital_);
}
-void initialize(){}
+void
+WriteOrbital::initialize() {}
/////////////////////////////////////////////////////////////////////////////
Modified: trunk/mpqc/src/lib/chemistry/qc/wfn/orbital.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/wfn/orbital.h 2010-10-10 15:26:33 UTC (rev 9552)
+++ trunk/mpqc/src/lib/chemistry/qc/wfn/orbital.h 2010-10-11 02:43:08 UTC (rev 9553)
@@ -76,6 +76,7 @@
</dl> */
WriteOrbital(const Ref<KeyVal> &);
+ ~WriteOrbital();
};
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-10 04:07:01
|
Revision: 9551
http://mpqc.svn.sourceforge.net/mpqc/?rev=9551&view=rev
Author: evaleev
Date: 2010-10-10 04:06:55 +0000 (Sun, 10 Oct 2010)
Log Message:
-----------
Fixed a bug in workaround that temporarily disables memory tracking by ConsumableResources.
Modified Paths:
--------------
trunk/mpqc/src/lib/util/misc/consumableresources.cc
Modified: trunk/mpqc/src/lib/util/misc/consumableresources.cc
===================================================================
--- trunk/mpqc/src/lib/util/misc/consumableresources.cc 2010-10-10 04:06:35 UTC (rev 9550)
+++ trunk/mpqc/src/lib/util/misc/consumableresources.cc 2010-10-10 04:06:55 UTC (rev 9551)
@@ -244,9 +244,13 @@
if (value + resource <= resource.max_value())
resource += value;
else
+#if !IGNORE_RESOURCE_OVERUSE
throw ProgrammingError("too much memory released -- some memory consumption must be untracked",
__FILE__, __LINE__,
class_desc());
+#else
+ resource += value;
+#endif
}
void ConsumableResources::release_disk(size_t value) {
rsize& resource = disk_.second;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-10 04:06:41
|
Revision: 9550
http://mpqc.svn.sourceforge.net/mpqc/?rev=9550&view=rev
Author: evaleev
Date: 2010-10-10 04:06:35 +0000 (Sun, 10 Oct 2010)
Log Message:
-----------
Fixed a bug in workaround that temporarily disables memory tracking by ConsumableResources.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/mbptr12/ref.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/mbptr12/ref.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbptr12/ref.cc 2010-10-09 01:35:48 UTC (rev 9549)
+++ trunk/mpqc/src/lib/chemistry/qc/mbptr12/ref.cc 2010-10-10 04:06:35 UTC (rev 9550)
@@ -224,7 +224,8 @@
uocc_sb_ = compute_canonvir_space(fbrun, uocc_sb_, spin);
}
else // empty vbs
- uocc_sb_ = vbs;
+ uocc_sb_ = new EmptyOrbitalSpace(id, oss.str(), vbs->basis(), vbs->integral(), OrbitalSpace::symmetry);
+ //uocc_sb_ = vbs;
}
}
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-09 01:35:54
|
Revision: 9549
http://mpqc.svn.sourceforge.net/mpqc/?rev=9549&view=rev
Author: evaleev
Date: 2010-10-09 01:35:48 +0000 (Sat, 09 Oct 2010)
Log Message:
-----------
Fixed problem with FockBuilderRuntime that occurs when spin-unpolarized densities used (UHF for closed-shell molecule).
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/mbptr12/fockbuild_runtime.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/mbptr12/fockbuild_runtime.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbptr12/fockbuild_runtime.cc 2010-10-07 15:14:16 UTC (rev 9548)
+++ trunk/mpqc/src/lib/chemistry/qc/mbptr12/fockbuild_runtime.cc 2010-10-09 01:35:48 UTC (rev 9549)
@@ -158,8 +158,8 @@
std::string
alternatespin_key(const std::string& key, SpinCase1 new_spin) {
ParsedOneBodyIntKey pkey(key);
- std::string askey = ParsedOneBodyIntKey::key(pkey.ket(), pkey.bra(),
- pkey.oper(), new_spin);
+ std::string askey = ParsedOneBodyIntKey::key(pkey.bra(), pkey.ket(),
+ pkey.oper(), new_spin);
return askey;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-07 15:14:22
|
Revision: 9548
http://mpqc.svn.sourceforge.net/mpqc/?rev=9548&view=rev
Author: evaleev
Date: 2010-10-07 15:14:16 +0000 (Thu, 07 Oct 2010)
Log Message:
-----------
Fixed a bug in SD_RefWavefunction that affects [2]_R12 calculations with spin-restricted open-shell Hartree-Fock reference wavefunctions.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/mbptr12/ref.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/mbptr12/ref.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbptr12/ref.cc 2010-10-07 15:13:00 UTC (rev 9547)
+++ trunk/mpqc/src/lib/chemistry/qc/mbptr12/ref.cc 2010-10-07 15:14:16 UTC (rev 9548)
@@ -552,7 +552,7 @@
RefSymmSCMatrix
SD_RefWavefunction::ordm(SpinCase1 s) const {
s = valid_spincase(s);
- if (spin_restricted()) s = Alpha;
+ if (spin_polarized() == false) s = Alpha;
if (s == Alpha) return obwfn()->alpha_ao_density();
return obwfn()->beta_ao_density();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-07 15:13:06
|
Revision: 9547
http://mpqc.svn.sourceforge.net/mpqc/?rev=9547&view=rev
Author: evaleev
Date: 2010-10-07 15:13:00 +0000 (Thu, 07 Oct 2010)
Log Message:
-----------
Fixed minor bug that would not affect any current MPQC capability.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.cc 2010-10-07 00:53:22 UTC (rev 9546)
+++ trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.cc 2010-10-07 15:13:00 UTC (rev 9547)
@@ -161,7 +161,6 @@
throw ProgrammingError("lowerupper_index(p,q) -- p and q are not allowed to be equal.",__FILE__,__LINE__);
}
}
-
double indexsizeorder_sign(int p,int q) {
if(p>q) {
return(1.0);
@@ -844,7 +843,7 @@
RefSCMatrix Cmat = local_matrix_kit->matrix(r12eval_->dim_GG(S),r12eval_->dim_gg(S));
if(S==AlphaBeta) {
SpinMOPairIter OW_iter(r12eval_->GGspace(Alpha), r12eval_->GGspace(Beta), S );
- SpinMOPairIter PQ_iter(r12eval_->ggspace(Alpha), r12eval_->GGspace(Beta), S );
+ SpinMOPairIter PQ_iter(r12eval_->ggspace(Alpha), r12eval_->ggspace(Beta), S );
Ref<R12Technology::GeminalDescriptor> geminaldesc = r12world()->r12tech()->corrfactor()->geminaldescriptor();
CuspConsistentGeminalCoefficient coeff_gen(S,geminaldesc);
for(OW_iter.start(); int(OW_iter); OW_iter.next()) {
@@ -862,7 +861,7 @@
else {
SpinCase1 spin = (S==AlphaAlpha) ? Alpha : Beta;
SpinMOPairIter OW_iter(r12eval_->GGspace(spin), r12eval_->GGspace(spin), S );
- SpinMOPairIter PQ_iter(r12eval_->ggspace(spin), r12eval_->GGspace(spin), S );
+ SpinMOPairIter PQ_iter(r12eval_->ggspace(spin), r12eval_->ggspace(spin), S );
Ref<R12Technology::GeminalDescriptor> geminaldesc = r12world()->r12tech()->corrfactor()->geminaldescriptor();
CuspConsistentGeminalCoefficient coeff_gen(S,geminaldesc);
for(OW_iter.start(); int(OW_iter); OW_iter.next()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-07 00:53:29
|
Revision: 9546
http://mpqc.svn.sourceforge.net/mpqc/?rev=9546&view=rev
Author: evaleev
Date: 2010-10-07 00:53:22 +0000 (Thu, 07 Oct 2010)
Log Message:
-----------
Added conversion script from g94 format to MPQC format.
Added Paths:
-----------
trunk/mpqc/bin/g94_2_MPQC.pl
Added: trunk/mpqc/bin/g94_2_MPQC.pl
===================================================================
--- trunk/mpqc/bin/g94_2_MPQC.pl (rev 0)
+++ trunk/mpqc/bin/g94_2_MPQC.pl 2010-10-07 00:53:22 UTC (rev 9546)
@@ -0,0 +1,194 @@
+#!/usr/bin/perl
+
+##############################################################################
+#
+# BASIS SET FORMAT CONVERTER - GAUSSIAN_94 TO MPQC
+#
+###############################################################################
+#
+# Used to convert a basis set formatted according to Gaussian 94 rules to
+# to the MPQC format. Reads g94 basis set from STDIN and prints out to STDOUT
+#
+# Usage: g94_2_MPQC < input_file_name > output_file_name
+# g94_2_MPQC STDIN STDOUT
+#
+##############################################################################
+#
+
+%elemname = (
+ G => ghost,
+ H => hydrogen,
+ HE => helium,
+ LI => lithium,
+ BE => berillium,
+ B => boron,
+ C => carbon,
+ N => nitrogen,
+ O => oxygen,
+ F => fluorine,
+ NE => neon,
+ NA => sodium,
+ MG => magnesium,
+ AL => aluminum,
+ SI => silicon,
+ P => phosphorus,
+ S => sulfur,
+ CL => chlorine,
+ AR => argon,
+ K => POTASSIUM,
+ CA => CALCIUM,
+ SC => SCANDIUM,
+ TI => TITANIUM,
+ V => VANADIUM,
+ CR => CHROMIUM,
+ MN => MANGANESE,
+ FE => IRON,
+ CO => COBALT,
+ NI => NICKEL,
+ CU => COPPER,
+ ZN => ZINC,
+ GA => GALLIUM,
+ GE => GERMANIUM,
+ AS => ARSENIC,
+ SE => SELENIUM,
+ BR => BROMINE,
+ KR => KRYPTON,
+ RB => RUBIDIUM,
+ SR => STRONTIUM,
+ Y => YTTRIUM,
+ ZR => ZIRCONIUM,
+ NB => NIOBIUM,
+ MO => MOLYBDENUM,
+ TE => TECHNETIUM,
+ RU => RUTHENIUM,
+ RH => RHODIUM,
+ PD => PALLADIUM,
+ AG => SILVER,
+ CD => CADMIUM,
+ IN => INDIUM,
+ SN => TIN,
+ SB => ANTIMONY,
+ TE => TELLURIUM,
+ I => IODINE,
+ XE => XENON,
+ CS => CESIUM,
+ BA => BARIUM,
+ LA => LANTHANUM,
+ CE => CERIUM,
+ PR => PRASEODYMIUM,
+ ND => NEODYMIUM,
+ PM => PROMETHIUM,
+ SM => SAMARIUM,
+ EU => EUROPIUM,
+ GD => GADOLINIUM,
+ TB => TERBIUM,
+ DY => DYSPROSIUM,
+ HO => HOLMIUM,
+ ER => ERBIUM,
+ TM => THULIUM,
+ YB => YTTERBIUM,
+ LU => LUTETIUM,
+ HF => HAFNIUM,
+ TA => TANATLUM,
+ W => TUNGSTEN,
+ RE => RHENIUM,
+ OS => OSMIUM,
+ IR => IRIDIUM,
+ PT => PLATINUM,
+ AU => GOLD,
+ HG => MERCURY,
+ TL => THALLIUM,
+ PB => LEAD,
+ BI => BISMUTH,
+ PO => POLONIUM,
+ AT => ASTATINE,
+ RN => RADON,
+ FR => FRANCIUM,
+ RA => RADIUM,
+ U => URANIUM,
+ NP => NEPTUNIUM,
+ PU => PLUTONIUM,
+);
+
+# Find the first line containing BASIS keyword and parse basis name
+BASIS: while (<STDIN>) {
+ # Skip all lines until the first containing BASIS keyword
+ ( !/BASIS|Basis|basis/) && next BASIS;
+ ($scr, $basisname) = split "\"";
+ last BASIS;
+ }
+
+my $pure = 0;
+# make sure puream is 1 for correlation consistent and ano basis sets
+# and 6-311g and sto-ng
+if ($basisname =~ /cc-p/ || $basisname =~ /ANO/
+ || $basisname =~ /^6-311G/
+ || $basisname =~ /^6-311\+/
+ || $basisname =~ /^STO-[1-9]G/
+ ) {
+ $pure = 1;
+}
+
+
+# Parse element name, contractions and primitives
+MAIN: while (<STDIN>) {
+ # check if subsequent basis sets redefine basis name
+ if (/BASIS|Basis|basis/) {
+ ($scr, $basisname) = split "\"";
+ next MAIN;
+ }
+ # Grab the element symbol and transform it to the standard
+ # full element name
+ chomp;
+ @tokens = split " ";
+ $elemsymb = $tokens[0];
+ $elemsymb eq "" && last MAIN;
+ $elemsymb =~ tr/[a-z]/[A-Z]/;
+ print "basis:$elemname{$elemsymb}:\"$basisname\": [";
+
+ # Loop over each contraction
+ CONTR: while (<STDIN>) {
+ /\*\*\*\*/ && last CONTR;
+ ($am, $num_prim, $junk) = split " ";
+ # Split SP contractions to S and P contractions
+ # Print in MPQC format
+ if ($am =~ /SP/) {
+ $num_prim2=$num_prim;
+ # Read in each primitive
+ print "\n (type: [am = S]\n {exp coef:0} = {\n ";
+ for($i=0; $i<$num_prim; $i++) {
+ ($exp[$i], $s_coeff[$i], $p_coeff[$i] ) = split " ", <STDIN>;
+ printf " %30.12e %30.12e", $exp[$i],$s_coeff[$i];
+ $i != $num_prim - 1 && print "\n ";
+ }
+ print "})"; # close the contraction
+ print "\n (type: [(am = P puream = $pure)]\n {exp coef:0} = {\n ";
+ for($i=0; $i<$num_prim2; $i++) {
+ printf " %30.12e %30.12e", $exp[$i],$p_coeff[$i];
+ $i != $num_prim - 1 && print "\n ";
+ }
+ print "})"; # close the contraction
+ }
+ # Print the other contractions in MPQC format
+ else{
+ if ($am ne "S") {
+ print "\n (type: [(am = $am puream = $pure)]\n {exp coef:0} = {\n ";
+ }
+ else {
+ print "\n (type: [am = S]\n {exp coef:0} = {\n ";
+ }
+ # Read in each primitive
+ for ($i=0; $i<$num_prim; $i++) {
+ ($exp, $coeff) = split " ", <STDIN>;
+ $exp =~ s/D/E/;
+ $coeff =~ s/D/E/;
+ printf " %30.12e %30.12e", $exp,$coeff;
+ $i != $num_prim - 1 && print "\n ";
+ }
+ print "})"; # close the contraction
+ }
+ }
+ print "\n]\n\n"; # close the basis set
+}
+
+
Property changes on: trunk/mpqc/bin/g94_2_MPQC.pl
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-07 00:50:05
|
Revision: 9545
http://mpqc.svn.sourceforge.net/mpqc/?rev=9545&view=rev
Author: evaleev
Date: 2010-10-07 00:49:57 +0000 (Thu, 07 Oct 2010)
Log Message:
-----------
Updated documentation for SymmSCMatrix::element_op functions.
Modified Paths:
--------------
trunk/mpqc/src/lib/math/scmat/abstract.h
Modified: trunk/mpqc/src/lib/math/scmat/abstract.h
===================================================================
--- trunk/mpqc/src/lib/math/scmat/abstract.h 2010-10-07 00:49:25 UTC (rev 9544)
+++ trunk/mpqc/src/lib/math/scmat/abstract.h 2010-10-07 00:49:57 UTC (rev 9545)
@@ -489,12 +489,22 @@
/// Return the generalized inverse of this using SVD decomposition. \sa SCMatrix::gen_invert_this()
virtual void gen_invert_this(double condition_number_threshold = 1e8) = 0;
- /// Perform the element operation op on each element of this.
+ //@{ Perform the element operation op on each element of this. Note that the operation is
+ /// only applied to the unique elements of this. For example, to compute the sum of all matrix
+ /// elements you need to do the following:
+ /// \code
+ /// SymmSCMatrix* A; // presumed initialized elsewhere
+ /// A->element_op(new SCElementScaleDiagonal(0.5)); // scale the diagonal by 1/2
+ /// SCElementSum* sum_op = new SCElementSum;
+ /// A->element_op(sum_op);
+ /// std::cout << "Sum of element of matrix A = " << sum_op->result() * 2.0 << std::endl;
+ /// \endcode
virtual void element_op(const Ref<SCElementOp>&) = 0;
virtual void element_op(const Ref<SCElementOp2>&,
SymmSCMatrix*) = 0;
virtual void element_op(const Ref<SCElementOp3>&,
SymmSCMatrix*,SymmSCMatrix*) = 0;
+ //@}
/// Print out the matrix.
void print(std::ostream&o=ExEnv::out0()) const;
void print(const char* title=0,std::ostream& out=ExEnv::out0(),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-07 00:49:35
|
Revision: 9544
http://mpqc.svn.sourceforge.net/mpqc/?rev=9544&view=rev
Author: evaleev
Date: 2010-10-07 00:49:25 +0000 (Thu, 07 Oct 2010)
Log Message:
-----------
1) Removed SCElementSumAbs (same as SCElementKNorm(1))
2) Added SCElementSum
3) Minor changes to SCElementKNorm
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/mbpt/csgrad.cc
trunk/mpqc/src/lib/chemistry/qc/mbptr12/print_scmat_norms.h
trunk/mpqc/src/lib/math/scmat/elemop.cc
trunk/mpqc/src/lib/math/scmat/elemop.h
Modified: trunk/mpqc/src/lib/chemistry/qc/mbpt/csgrad.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbpt/csgrad.cc 2010-10-07 00:45:27 UTC (rev 9543)
+++ trunk/mpqc/src/lib/chemistry/qc/mbpt/csgrad.cc 2010-10-07 00:49:25 UTC (rev 9544)
@@ -1696,7 +1696,7 @@
s2_diag = sqrt(s2_diag/(2*nocc_act));
// compute the T1 matrix 1-norm
double t1onenorm = 0.0;
- Ref<SCElementSumAbs> sumabs = new SCElementSumAbs;
+ Ref<SCElementKNorm> sumabs = new SCElementKNorm(1);
Ref<SCElementOp> genop = sumabs.pointer();
for (a=0; a < nvir_act; a++) {
sumabs->init();
Modified: trunk/mpqc/src/lib/chemistry/qc/mbptr12/print_scmat_norms.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbptr12/print_scmat_norms.h 2010-10-07 00:45:27 UTC (rev 9543)
+++ trunk/mpqc/src/lib/chemistry/qc/mbptr12/print_scmat_norms.h 2010-10-07 00:49:25 UTC (rev 9544)
@@ -47,11 +47,11 @@
A.element_op(maxabs_op);
const double maxabs = maxabs_op->result();
- Ref<SCElementKNorm> onenorm_op(new SCElementKNorm(1.0));
+ Ref<SCElementKNorm> onenorm_op(new SCElementKNorm(1));
A.element_op(onenorm_op);
const double onenorm = onenorm_op->result();
- Ref<SCElementKNorm> twonorm_op(new SCElementKNorm(2.0));
+ Ref<SCElementKNorm> twonorm_op(new SCElementKNorm(2));
A.element_op(twonorm_op);
const double twonorm = twonorm_op->result();
Modified: trunk/mpqc/src/lib/math/scmat/elemop.cc
===================================================================
--- trunk/mpqc/src/lib/math/scmat/elemop.cc 2010-10-07 00:45:27 UTC (rev 9543)
+++ trunk/mpqc/src/lib/math/scmat/elemop.cc 2010-10-07 00:49:25 UTC (rev 9544)
@@ -695,7 +695,7 @@
typeid(SCElementKNorm),"SCElementKNorm",1,"public SCElementOp",
0, 0, create<SCElementKNorm>);
-SCElementKNorm::SCElementKNorm(double k):deferred_(0), r_(0.0), k_(k) {}
+SCElementKNorm::SCElementKNorm(unsigned int k):deferred_(0), r_(0.0), k_(k) {}
SCElementKNorm::SCElementKNorm(StateIn&s):
SCElementOp(s)
{
@@ -713,11 +713,41 @@
void
SCElementKNorm::process(SCMatrixBlockIter&i)
{
+ switch (k_) {
+ case 1u:
+ r_ += _process1(i); break;
+ case 2u:
+ r_ += _process2(i); break;
+ default:
+ r_ += _process(i, k_);
+ }
+}
+double
+SCElementKNorm::_process(SCMatrixBlockIter& i, int k) {
+ double result = 0.0;
for (i.reset(); i; ++i) {
- r_ += std::pow(std::abs(i.get()),k_);
+ result += std::pow(std::abs(i.get()),static_cast<double>(k));
}
+ return result;
}
double
+SCElementKNorm::_process1(SCMatrixBlockIter& i) {
+ double result = 0.0;
+ for (i.reset(); i; ++i) {
+ result += std::abs(i.get());
+ }
+ return result;
+}
+double
+SCElementKNorm::_process2(SCMatrixBlockIter& i) {
+ double result = 0.0;
+ for (i.reset(); i; ++i) {
+ const double v = i.get();
+ result += v * v;
+ }
+ return result;
+}
+double
SCElementKNorm::result()
{
return r_;
@@ -802,58 +832,58 @@
}
/////////////////////////////////////////////////////////////////////////
-// SCElementSumAbs members
+// SCElementSum members
-static ClassDesc SCElementSumAbs_cd(
- typeid(SCElementSumAbs),"SCElementSumAbs",1,"public SCElementOp",
- 0, 0, create<SCElementSumAbs>);
-SCElementSumAbs::SCElementSumAbs():deferred_(0), r(0.0) {}
-SCElementSumAbs::SCElementSumAbs(StateIn&s):
+static ClassDesc SCElementSum_cd(
+ typeid(SCElementSum),"SCElementSum",1,"public SCElementOp",
+ 0, 0, create<SCElementSum>);
+SCElementSum::SCElementSum():deferred_(0), r(0.0) {}
+SCElementSum::SCElementSum(StateIn&s):
SCElementOp(s)
{
s.get(r);
s.get(deferred_);
}
void
-SCElementSumAbs::save_data_state(StateOut&s)
+SCElementSum::save_data_state(StateOut&s)
{
s.put(r);
s.put(deferred_);
}
-SCElementSumAbs::~SCElementSumAbs() {}
+SCElementSum::~SCElementSum() {}
void
-SCElementSumAbs::process(SCMatrixBlockIter&i)
+SCElementSum::process(SCMatrixBlockIter&i)
{
for (i.reset(); i; ++i) {
- r += fabs(i.get());
+ r += i.get();
}
}
double
-SCElementSumAbs::result()
+SCElementSum::result()
{
return r;
}
int
-SCElementSumAbs::has_collect()
+SCElementSum::has_collect()
{
return 1;
}
void
-SCElementSumAbs::defer_collect(int h)
+SCElementSum::defer_collect(int h)
{
deferred_=h;
}
void
-SCElementSumAbs::collect(const Ref<MessageGrp>&msg)
+SCElementSum::collect(const Ref<MessageGrp>&msg)
{
if (!deferred_)
msg->sum(r);
}
void
-SCElementSumAbs::collect(const Ref<SCElementOp>&op)
+SCElementSum::collect(const Ref<SCElementOp>&op)
{
throw std::runtime_error(
- "SCElementSumAbs::collect(const Ref<SCElementOp> &): not implemented");
+ "SCElementSum::collect(const Ref<SCElementOp> &): not implemented");
}
/////////////////////////////////////////////////////////////////////////
Modified: trunk/mpqc/src/lib/math/scmat/elemop.h
===================================================================
--- trunk/mpqc/src/lib/math/scmat/elemop.h 2010-10-07 00:45:27 UTC (rev 9543)
+++ trunk/mpqc/src/lib/math/scmat/elemop.h 2010-10-07 00:49:25 UTC (rev 9544)
@@ -34,6 +34,7 @@
#include <util/state/state.h>
#include <util/group/message.h>
+#include <cmath>
namespace sc {
@@ -329,14 +330,14 @@
};
-class SCElementSumAbs: public SCElementOp {
+class SCElementSum: public SCElementOp {
private:
int deferred_;
double r;
public:
- SCElementSumAbs();
- SCElementSumAbs(StateIn&);
- ~SCElementSumAbs();
+ SCElementSum();
+ SCElementSum(StateIn&);
+ ~SCElementSum();
void save_data_state(StateOut&);
void process(SCMatrixBlockIter&);
int has_collect();
@@ -347,15 +348,20 @@
void init() { r = 0.0; }
};
-/// Computed k-norm of matrix.
+/// Computes k-norm of matrix.
class SCElementKNorm: public SCElementOp {
private:
int deferred_;
double r_; // result
- double k_; // norm parameter
+ unsigned int k_; // norm parameter
+
+ static double _process(SCMatrixBlockIter& i, int k);
+ static double _process1(SCMatrixBlockIter& i);
+ static double _process2(SCMatrixBlockIter& i);
+
public:
/// by default compute 2-norm
- SCElementKNorm(double k = 2.0);
+ SCElementKNorm(unsigned int k = 2);
SCElementKNorm(StateIn&);
~SCElementKNorm();
void save_data_state(StateOut&);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-07 00:45:34
|
Revision: 9543
http://mpqc.svn.sourceforge.net/mpqc/?rev=9543&view=rev
Author: evaleev
Date: 2010-10-07 00:45:27 +0000 (Thu, 07 Oct 2010)
Log Message:
-----------
Fixed a bug in FockBuilder.
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/mbptr12/fockbuilder.h
Modified: trunk/mpqc/src/lib/chemistry/qc/mbptr12/fockbuilder.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbptr12/fockbuilder.h 2010-10-07 00:43:03 UTC (rev 9542)
+++ trunk/mpqc/src/lib/chemistry/qc/mbptr12/fockbuilder.h 2010-10-07 00:45:27 UTC (rev 9543)
@@ -267,10 +267,14 @@
}
}
- if (compute_F_ && !really_compute_F)
- for(int t=0; t<ntypes_; ++t) {
- result_[t][2] = result_[t][0] - result_[t][1];
+ if (compute_F_ && !really_compute_F) {
+ // F = J - K = J - 1/2 (Ka + Kb)
+ result_[0][2] = result_[0][0] - result_[0][1];
+ if (ntypes_ == 2) { // Fo = -Ko = -1/2 (Ka - Kb)
+ result_[1][2] = result_[1][1].copy();
+ result_[1][2].scale(-1.0);
}
+ }
}
@@ -281,7 +285,7 @@
return result_[t][2];
}
const ResultType& J(unsigned int t = 0) const {
- assert(compute_J_ && t < ntypes_);
+ assert(compute_J_ && t < ntypes_ && t == 0);
return result_[t][0];
}
const ResultType& K(unsigned int t = 0) const {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-07 00:43:16
|
Revision: 9542
http://mpqc.svn.sourceforge.net/mpqc/?rev=9542&view=rev
Author: evaleev
Date: 2010-10-07 00:43:03 +0000 (Thu, 07 Oct 2010)
Log Message:
-----------
Removed redundant keywords for which the defaults are OK.
Modified Paths:
--------------
trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc00ccpvdzaugccpvdzc2v.in
trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc01ccpvdzaugccpvdzc2v.in
trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc10ccpvdzaugccpvdzc2v.in
trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc11ccpvdzaugccpvdzc2v.in
trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_mrcic00ccpvdzaugccpvdzc2v.in
trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_mrcic10ccpvdzaugccpvdzc2v.in
Modified: trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc00ccpvdzaugccpvdzc2v.in
===================================================================
--- trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc00ccpvdzaugccpvdzc2v.in 2010-10-07 00:38:29 UTC (rev 9541)
+++ trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc00ccpvdzaugccpvdzc2v.in 2010-10-07 00:43:03 UTC (rev 9542)
@@ -63,10 +63,7 @@
value_accuracy = 1e-9
nfzc = 1
- ex_lvl = 10
- ras1 = [0 0 0 0]
ras2 = [3 0 1 1]
- ras3_max = 0
maxiter = 12
root = 1
nroots = 2
Modified: trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc01ccpvdzaugccpvdzc2v.in
===================================================================
--- trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc01ccpvdzaugccpvdzc2v.in 2010-10-07 00:38:29 UTC (rev 9541)
+++ trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc01ccpvdzaugccpvdzc2v.in 2010-10-07 00:43:03 UTC (rev 9542)
@@ -63,8 +63,6 @@
value_accuracy = 1e-11
nfzc = 1
- ex_lvl = 10
- ras1 = [0 0 0 0]
ras2 = [3 0 1 1]
root = 1
nroots = 2
Modified: trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc10ccpvdzaugccpvdzc2v.in
===================================================================
--- trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc10ccpvdzaugccpvdzc2v.in 2010-10-07 00:38:29 UTC (rev 9541)
+++ trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc10ccpvdzaugccpvdzc2v.in 2010-10-07 00:43:03 UTC (rev 9542)
@@ -63,8 +63,6 @@
value_accuracy = 1e-11
nfzc = 1
- ex_lvl = 10
- ras1 = [0 0 0 0]
ras2 = [3 0 1 1]
root = 1
nroots = 2
Modified: trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc11ccpvdzaugccpvdzc2v.in
===================================================================
--- trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc11ccpvdzaugccpvdzc2v.in 2010-10-07 00:38:29 UTC (rev 9541)
+++ trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_casscfc11ccpvdzaugccpvdzc2v.in 2010-10-07 00:43:03 UTC (rev 9542)
@@ -63,8 +63,6 @@
value_accuracy = 1e-11
nfzc = 1
- ex_lvl = 10
- ras1 = [0 0 0 0]
ras2 = [3 0 1 1]
root = 1
nroots = 2
Modified: trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_mrcic00ccpvdzaugccpvdzc2v.in
===================================================================
--- trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_mrcic00ccpvdzaugccpvdzc2v.in 2010-10-07 00:38:29 UTC (rev 9541)
+++ trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_mrcic00ccpvdzaugccpvdzc2v.in 2010-10-07 00:43:03 UTC (rev 9542)
@@ -64,8 +64,6 @@
value_accuracy = 1e-9
nfzc = 1
- ex_lvl = 10
- ras1 = [0 0 0 0]
ras2 = [3 0 1 1]
ras3_max = 2
root = 1
@@ -85,10 +83,8 @@
)
value_accuracy = 1e-9
- nfzc = 1
- ex_lvl = 10
- ras1 = [0 0 0 0]
- ras2 = [3 0 1 1]
+ nfzc = $..:nfzc
+ ras2 = $..:ras2
nroots = 2
valence_obwfn<CLHF>: (
molecule = $:molecule
Modified: trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_mrcic10ccpvdzaugccpvdzc2v.in
===================================================================
--- trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_mrcic10ccpvdzaugccpvdzc2v.in 2010-10-07 00:38:29 UTC (rev 9541)
+++ trunk/mpqc/src/bin/mpqc/validate/ref/psipt2f12_mrcic10ccpvdzaugccpvdzc2v.in 2010-10-07 00:43:03 UTC (rev 9542)
@@ -64,8 +64,6 @@
value_accuracy = 1e-9
nfzc = 1
- ex_lvl = 10
- ras1 = [0 0 0 0]
ras2 = [3 0 1 1]
ras3_max = 2
root = 1
@@ -85,10 +83,8 @@
)
value_accuracy = 1e-9
- nfzc = 1
- ex_lvl = 10
- ras1 = [0 0 0 0]
- ras2 = [3 0 1 1]
+ nfzc = $..:nfzc
+ ras2 = $..:ras2
nroots = 2
valence_obwfn<CLHF>: (
molecule = $:molecule
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2010-10-07 00:38:37
|
Revision: 9541
http://mpqc.svn.sourceforge.net/mpqc/?rev=9541&view=rev
Author: evaleev
Date: 2010-10-07 00:38:29 +0000 (Thu, 07 Oct 2010)
Log Message:
-----------
1) PsiRASSCF now runs as true RASSCF, not as CASSCF. Every mention of CASSCF has been removed.
2) many documentation updates
Modified Paths:
--------------
trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.cc
trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.h
trunk/mpqc/src/lib/chemistry/qc/psi/psicc_pt2r12.cc
trunk/mpqc/src/lib/chemistry/qc/psi/psici.cc
trunk/mpqc/src/lib/chemistry/qc/psi/psici.h
trunk/mpqc/src/lib/chemistry/qc/psi/psiref.cc
trunk/mpqc/src/lib/chemistry/qc/psi/psiwfn.cc
Modified: trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.cc 2010-10-05 22:09:25 UTC (rev 9540)
+++ trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.cc 2010-10-07 00:38:29 UTC (rev 9541)
@@ -690,8 +690,15 @@
// find equivalent spaces in the registry
Ref<OrbitalSpaceRegistry> oreg = this->r12world()->world()->tfactory()->orbital_registry();
- if (!oreg->value_exists(space1) || !oreg->value_exists(space2))
- throw ProgrammingError("PT2R12::g() -- spaces must be registered",__FILE__,__LINE__);
+ bool registered_space1=false, registered_space2=false;
+ if (!oreg->value_exists(space1)) {
+ oreg->add(make_keyspace_pair(space1));
+ registered_space1 = true;
+ }
+ if (!oreg->value_exists(space2)) {
+ oreg->add(make_keyspace_pair(space2));
+ registered_space2 = true;
+ }
const std::string key1 = oreg->key(space1);
Ref<OrbitalSpace> s1 = oreg->value(key1);
const std::string key2 = oreg->key(space2);
@@ -710,6 +717,9 @@
r12eval_->compute_tbint_tensor<ManyBodyTensors::I_to_T,false,false>(G,TwoBodyOper::eri,s1,s1,s2,s2,
antisymmetrize,tforms);
+ if (registered_space1) oreg->remove(space1->id());
+ if (registered_space2) oreg->remove(space2->id());
+
return(G);
}
@@ -1225,6 +1235,12 @@
RefSCMatrix TBT_tpdm = TBT*tpdm;
RefSCMatrix HylleraasMatrix = TBT_tpdm;
if (this->debug_ >= DefaultPrintThresholds::mostO4) {
+ //rdm2(pairspin).print(prepend_spincase(pairspin,"rdm2 (full)").c_str());
+ tpdm.print(prepend_spincase(pairspin,"rdm2").c_str());
+ rdm1(Alpha).print(prepend_spincase(Alpha,"rdm1 (full)").c_str());
+ rdm1_gg(Alpha).print(prepend_spincase(Alpha,"rdm1").c_str());
+ rdm1(Beta).print(prepend_spincase(Beta,"rdm1 (full)").c_str());
+ rdm1_gg(Beta).print(prepend_spincase(Beta,"rdm1").c_str());
TBT.print(prepend_spincase(pairspin,"TBT").c_str());
TBT_tpdm.print(prepend_spincase(pairspin,"TBTg").c_str());
}
@@ -1306,9 +1322,9 @@
result.assign(0.0);
// it's possible for gspace to be a superset of orbs
std::vector<int> omap = map(*orbs, *gspace);
- const int nmo = orbs->rank();
-
- for(int R=0; R<nmo; ++R)
+ const int ng = gspace->rank();
+
+ for(int R=0; R<ng; ++R)
for(int C=0; C<=R; ++C) {
const int rr = omap[R];
const int cc = omap[C];
@@ -1487,12 +1503,12 @@
{
ExEnv::out0() << indent << scprintf("CABS singles energy correction: %17.12lf",
cabs_singles_correction) << endl;
- ExEnv::out0() << indent << scprintf("CASSCF+CABS singles correction: %17.12lf",
+ ExEnv::out0() << indent << scprintf("RASSCF+CABS singles correction: %17.12lf",
reference_->energy() + cabs_singles_correction) << endl;
}
ExEnv::out0() << indent << scprintf("CABS correction (twobody H0): %17.12lf",
cabs_singles_correction_twobody_H0) << endl;
- ExEnv::out0() << indent << scprintf("CASSCF+CABS (twobody H0): %17.12lf",
+ ExEnv::out0() << indent << scprintf("RASSCF+CABS (twobody H0): %17.12lf",
reference_->energy() + cabs_singles_correction_twobody_H0) << endl;
@@ -2312,7 +2328,11 @@
// H and opdm might use different SCMatrixKits -> copy H into another matrix with the same kit as opdm
RefSymmSCMatrix hh = opdm.clone();
hh->convert(H);
- oneparticle_energy[spin] = (hh * opdm)->trace();
+ hh->element_op(new SCElementScaleDiagonal(0.5));
+
+ Ref<SCElementScalarProduct> trace_op = new SCElementScalarProduct;
+ hh->element_op(trace_op, opdm);
+ oneparticle_energy[spin] = trace_op->result() * 2.0;
}
for(int spincase2=0; spincase2<npurespincases2; spincase2++) {
@@ -2323,9 +2343,16 @@
const Ref<OrbitalSpace>& space2 = rdm2_->orbs(spin2);
const RefSymmSCMatrix tpdm = rdm2(pairspin);
- const RefSCMatrix G = g(pairspin, space1, space2);
+ RefSCMatrix G = g(pairspin, space1, space2);
+ // G and opdm might use different SCMatrixKits -> copy G into another matrix with the same kit as opdm
+ RefSymmSCMatrix gg = tpdm.clone(); gg.assign(0.0);
+ gg->accumulate_subblock(G.pointer(), 0, G.nrow()-1, 0, G.ncol() - 1); // his automatically scales off diagonal elements by 2
+ // no need to scale the diagonal when taking scalar product
+ G = 0;
- twoparticle_energy[pairspin] = (G * tpdm).trace();
+ Ref<SCElementScalarProduct> trace_op = new SCElementScalarProduct;
+ gg->element_op(trace_op, tpdm);
+ twoparticle_energy[pairspin] = trace_op->result();
}
if(!spin_polarized()) {
@@ -2333,23 +2360,23 @@
oneparticle_energy[Beta] = oneparticle_energy[Alpha];
}
-//#define ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS
+#define ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS 0
double energy_hcore = 0.0;
for(int i=0; i<NSpinCases1; i++) {
const SpinCase1 spin = static_cast<SpinCase1>(i);
-#ifdef ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS
+#if ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS
ExEnv::out0() << ((spin==Alpha) ? "Alpha" : "Beta") << " hcore energy: "
<< setprecision(12) << oneparticle_energy[i] << endl;
#endif
energy_hcore += oneparticle_energy[i];
}
-#ifdef ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS
+#if ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS
ExEnv::out0() << "hcore energy: " << setprecision(12) << energy_hcore << endl;
#endif
double energy_twoelec = 0.0;
for(int i=0; i<NSpinCases2; i++) {
-#ifdef ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS
+#if ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS
string pairspin_str = "";
if(i==0) {
pairspin_str = "AlphaBeta";
@@ -2364,7 +2391,7 @@
#endif
energy_twoelec += twoparticle_energy[i];
}
-#ifdef ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS
+#if ENERGY_CONVENTIONAL_PRINT_CONTRIBUTIONS
ExEnv::out0() << "two-electron energy: " << setprecision(12) << energy_twoelec << endl;
#endif
double energy = energy_hcore + energy_twoelec;
Modified: trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.h 2010-10-05 22:09:25 UTC (rev 9540)
+++ trunk/mpqc/src/lib/chemistry/qc/mbptr12/pt2r12.h 2010-10-07 00:38:29 UTC (rev 9541)
@@ -100,7 +100,7 @@
bool cabs_singles_;
bool cabs_singles_coupling_; // if set to true, we include the coupling between cabs and OBS virtual orbitals. This should be preferred choice,
// as explained in the paper.
- bool rotate_core_; // if set to false, when doing casscf cabs_singles correction, don't include excitation from core orbitals to cabs orbitals in
+ bool rotate_core_; // if set to false, when doing rasscf cabs_singles correction, don't include excitation from core orbitals to cabs orbitals in
// first-order Hamiltonian. (this may be used when using frozen core orbitals which
// are not optimized (does not satisfy Brillouin condition)). Currently, we suggest set it to 'true'
bool cabs_keep2A2pterm_; // keep the two-particle H with 2 CABS indices. This would lead to an algorithm scaling as n^6, instead of n^4. The
Modified: trunk/mpqc/src/lib/chemistry/qc/psi/psicc_pt2r12.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/psi/psicc_pt2r12.cc 2010-10-05 22:09:25 UTC (rev 9540)
+++ trunk/mpqc/src/lib/chemistry/qc/psi/psicc_pt2r12.cc 2010-10-07 00:38:29 UTC (rev 9541)
@@ -82,8 +82,6 @@
// cannot do coupling=true either
if (r12tech->coupling())
throw FeatureNotImplemented("PsiCCSD_PT2R12::PsiCCSD_PT2R12() -- coupling = true is not yet implemented",__FILE__,__LINE__);
-
- set_desired_value_accuracy(desired_value_accuracy());
}
PsiCCSD_PT2R12::~PsiCCSD_PT2R12() {
@@ -354,13 +352,15 @@
// NOTE: V_{xy}^{ia} T_a^j + V_{xy}^{aj} T_a^i = 2 * symm(V_{xy}^{ia} T_a^j)
symmetrize(VT1);
if (debug() >= DefaultPrintThresholds::allO4)
- _print(spincase2, VT1, prepend_spincase(spincase2,"<R|(H*T1)|0>").c_str());
+ _print(spincase2, VT1, prepend_spincase(spincase2,"1/2<R|(H*T1)|0>").c_str());
axpy(VT1, 2.0, HT);
}
else {
axpy(VT1, 1.0, HT);
// Vai^t . T1
contract3(Vai[s],T1[spin2].t(),VT1);
+ if (debug() >= DefaultPrintThresholds::allO4)
+ _print(spincase2, VT1, prepend_spincase(spincase2,"<R|(H*T1)|0>").c_str());
axpy(VT1, 1.0, HT);
}
Modified: trunk/mpqc/src/lib/chemistry/qc/psi/psici.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/psi/psici.cc 2010-10-05 22:09:25 UTC (rev 9540)
+++ trunk/mpqc/src/lib/chemistry/qc/psi/psici.cc 2010-10-07 00:38:29 UTC (rev 9541)
@@ -336,7 +336,7 @@
* MOs correspond to the respective MOs in the valence wfn. This vector
* can be used as the value of the "reorder" keyword in Psi to make the lowest-energy orbitals
* maximally similar to the valence orbitals. This is needed, for example, to avoid the inclusion
- * of diffuse orbitals into the active space of CASSCF calculations.
+ * of diffuse orbitals into the active space of RASSCF calculations.
*
* \param overlap is the overlap between a valence wfn (e.g. minimal basis HF) and a given wfn
*/
@@ -392,6 +392,7 @@
valence_obwfn_ << keyval->describedclassvalue("valence_obwfn");
if (valence_obwfn_.nonnull()) {
double valence_obwfn_energy = valence_obwfn_->energy();
+ this->reference()->compute();
moorder_ = detail::ref_to_valence_moorder(this->reference(),
this->valence_obwfn_);
}
@@ -428,7 +429,9 @@
if(ras2_.empty()) {
if (valence_obwfn_.nonnull()) { // if given, compute the valence space
ras2_.resize(nirrep);
- throw FeatureNotImplemented("automatic computation of RAS2", __FILE__, __LINE__, class_desc());
+ // ras2_[i] = valence_obwfn_.orbs[i] - frozen_docc[i] - ras1_[i];
+ for(unsigned int h=0; h<nirrep; ++h)
+ ras2_[h] = valence_obwfn_->oso_dimension()->blocks()->size(h) - frozen_docc[h] - ras1_[h];
}
else
InputError("valence_obwfn keyword is not given, thus ras2 vector must be specified",
@@ -554,7 +557,7 @@
input->write_keyword("detci:h0_blocksize",h0_blocksize_);
}
- if((repl_otf_==true) && !rasscf) { /// don't use "repl_otf" keyword for CASSCF calculations.
+ if((repl_otf_==true) && !rasscf) { /// don't use "repl_otf" keyword for RASSCF calculations.
input->write_keyword("detci:repl_otf","true");
}
@@ -564,13 +567,12 @@
input->write_keyword("detci:convergence", convergence_);
input->write_keyword("detci:maxiter", maxiter_);
- if (!ras1_.empty()) input->write_keyword_array("psi:ras1",ras1_);
- if (!ras2_.empty()) input->write_keyword_array("psi:ras2",ras2_);
- if (!ras3_.empty()) input->write_keyword_array("psi:ras3",ras3_);
- input->write_keyword("detci:ex_lvl",ras1_max_);
- input->write_keyword("psi:ras3_max",ras3_max_);
+ if (!ras1_.empty()) input->write_keyword_array("psi:ras1",ras1_);
+ if (!ras2_.empty()) input->write_keyword_array("psi:ras2",ras2_);
+ if (!ras3_.empty()) input->write_keyword_array("psi:ras3",ras3_);
+ input->write_keyword("detci:ex_lvl",ras1_max_);
+ input->write_keyword("psi:ras3_max",ras3_max_);
-
input->write_keyword("scf:levelshift",scf_levelshift_);
input->write_keyword("scf:stop_levelshift",scf_stop_levelshift_);
@@ -859,7 +861,8 @@
// reset some defaults for the RASCI class
energy_convergence_ = keyval->intvalue("energy_convergence",KeyValValueint(rasscf_energy_convergence_+2));
convergence_ = keyval->intvalue("convergence",KeyValValueint(rasscf_convergence_+2));
- ras3_max_ = keyval->intvalue("ras3_max",KeyValValueint(0));
+ if (keyval->exists("ras3") == false)
+ std::fill(ras3_.begin(), ras3_.end(), 0);
}
@@ -919,7 +922,7 @@
input->open();
PsiCorrWavefunction::write_input_frozen2restricted(convergence, relax_core_);
- input->write_keyword("psi:wfn", "casscf");
+ input->write_keyword("psi:wfn", "rasscf");
if (run_detci_only_)
input->write_keyword("psi:exec", "( \"cints\" \"transqt2\" \"detci\")");
@@ -951,6 +954,17 @@
const bool rasscf = true;
write_rasci_input(convergence, rasscf);
+ // need to compute restricted_uocc as well
+ // ruocc[i] = mos[i] - frozen_docc[i] - ras1_[i] - ras2_[i] - ras3_[i] - frozen_uocc[i];
+ const unsigned int nirr = this->nirrep();
+ std::vector<unsigned int> ruocc(nirr);
+ std::vector<unsigned int> mos = reference()->mopi();
+ vector<unsigned int> frozen_docc = this->frozen_docc();
+ vector<unsigned int> frozen_uocc = this->frozen_uocc();
+ for(unsigned int h=0; h<nirr; ++h)
+ ruocc[h] = mos[h] - frozen_docc[h] - ras1_[h] - ras2_[h] - ras3_[h] - frozen_uocc[h];
+ input->write_keyword_array("psi:restricted_uocc",ruocc);
+
input->close();
}
Modified: trunk/mpqc/src/lib/chemistry/qc/psi/psici.h
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/psi/psici.h 2010-10-05 22:09:25 UTC (rev 9540)
+++ trunk/mpqc/src/lib/chemistry/qc/psi/psici.h 2010-10-07 00:38:29 UTC (rev 9541)
@@ -59,11 +59,11 @@
<tr><td><tt>valence_obwfn</tt><td>OneBodyWavefunction<td>null<td>This optional keyword specifies
an object that will provide the orbital ordering for the initial guess. It is recommended to use
an SCF object with the minimal basis needed to express the orbitals used in defining the RAS spaces.
- For example, for a valence CASSCF this means that SCF with an STO-3G basis will suffice. For states
+ For example, for a valence RASSCF this means that SCF with an STO-3G basis will suffice. For states
with Rydberg character one may want to choose an appropriate ANO basis set.
<tr><td><tt>ras1</tt><td>array of integers<td>empty<td>Specifies the RAS I space. Up to <tt>ras1_max</tt> electrons can be excited from RAS I.
- <tr><td><tt>ras2</tt><td>array of integers<td>none<td>Specifies the RAS II space. Any number of electrons is allowed in RAS II
+ <tr><td><tt>ras2</tt><td>array of integers<td>valence_obwfn orbitals - frozen core - RAS1<td>Specifies the RAS II space. Any number of electrons is allowed in RAS II
<tr><td><tt>ras3</tt><td>array of integers<td>all orbitals - frozen core - RAS1 - RAS2<td>Specifies the RAS III space. Up to <tt>ras3_max</tt> electrons may be excited into RAS III.
<tr><td><tt>ras1_max</tt><td>integer<td>0<td>Specifies the maximum number of holes allowed in RAS I.
<tr><td><tt>ras3_max</tt><td>integer<td>0<td>Specifies the maximum number of electrons allowed in RAS III.
@@ -134,7 +134,7 @@
/** This OneBodyWavefunction defines valence orbitals.
*
* Purpose:
- * If a basis set with diffuse functions is used for a CASSCF calculation,
+ * If a basis set with diffuse functions is used for a RASSCF calculation,
* there may be energetically low lying diffuse obitals entering the active
* space if the orbitals are not reordered. The reference wave function helps
* to find the appropriate reordering by a 'black box' procedure which can be
@@ -170,6 +170,8 @@
<tr><td><b>%Keyword</b><td><b>Type</b><td><b>Default</b><td><b>Description</b>
+ <tr><td><tt>ras3</tt><td>array of integers<td>empty<td>Specifies the RAS III space. Up to <tt>ras3_max</tt> electrons may be excited into RAS III.
+
<tr><td><tt>state_average</tt><td>boolean<td>false<td>whether to do state-averaging. The default is to
compute optimal orbitals for the average of all states (see keyword <tt>num_states</tt>).
Modified: trunk/mpqc/src/lib/chemistry/qc/psi/psiref.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/psi/psiref.cc 2010-10-05 22:09:25 UTC (rev 9540)
+++ trunk/mpqc/src/lib/chemistry/qc/psi/psiref.cc 2010-10-07 00:38:29 UTC (rev 9541)
@@ -93,7 +93,17 @@
PsiSCF_RefWavefunction::ordm(SpinCase1 s) const {
s = valid_spincase(s);
if (!scf_->spin_polarized()) s = Alpha;
- RefSymmSCMatrix result = (s == Alpha) ? scf()->alpha_ao_density() : scf()->beta_ao_density();
+ RefSymmSCMatrix result;
+
+ Ref<PsiHSOSHF> hsoshf; hsoshf << scf_;
+
+ if (hsoshf.nonnull() && spin_restricted_ == false) { // HSOSHF + spin_unrestricted => must use semicanonical orbitals
+ // but secmicanonical densities are not implemented
+ throw FeatureNotImplemented("semicanonical densities should not be used", __FILE__, __LINE__, class_desc());
+ }
+ else {
+ result = (s == Alpha) ? scf()->alpha_ao_density() : scf()->beta_ao_density();
+ }
return result;
}
@@ -309,7 +319,6 @@
}
PsiRASCI_RefWavefunction::~PsiRASCI_RefWavefunction() {
- throw "not implemented";
}
void
Modified: trunk/mpqc/src/lib/chemistry/qc/psi/psiwfn.cc
===================================================================
--- trunk/mpqc/src/lib/chemistry/qc/psi/psiwfn.cc 2010-10-05 22:09:25 UTC (rev 9540)
+++ trunk/mpqc/src/lib/chemistry/qc/psi/psiwfn.cc 2010-10-07 00:38:29 UTC (rev 9541)
@@ -1584,6 +1584,8 @@
<< endl;
abort();
}
+
+ set_desired_value_accuracy(desired_value_accuracy());
}
PsiCorrWavefunction::~PsiCorrWavefunction() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|