Comments (6)
I think the problem here is the incredibly tight convergence criteria. For some reason I set the SCF convergence tolerance and the 2e integral tolerance to be equal (1E-12). 1E-12 is reasonable for integral screening, but is way too tight for SCF density changes, or even energy changes. RMS(P) changes are more reasonably set as 1E-8. So, the tight SCF convergence criteria, coupled with the integral screening means that in many cases the SCF will never "converge", due to error propagation (in general shouldn't expect SCF to be more accurate than the integral sit depends on).
The solution for now -- and this is not to say the direct SCF could be improved further -- would be to split the integral and SCF convergence criteria, a la:
def RHF(self,doPrint=True,DIIS=True,direct=False,conver=1e-8,acc2e=1e-12):
"""Routine to compute the RHF energy for a closed shell molecule"""
I think these are reasonable values, and are the defaults in Gaussian, for example.
from mcmurchie-davidson.
Now the input
from mmd.molecule import Molecule
from mmd.postscf import PostSCF
water = """
0 1
O 0.000000 -0.075791844 0.000000
H 0.866811829 0.601435779 0.000000
H -0.866811829 0.601435779 0.000000
"""
# init molecule and build integrals
mol = Molecule(geometry=water,basis='aug-cc-pvdz')
# do the SCF
print("conventional")
mol.RHF(direct=False)
print(" ")
print("direct")
mol.RHF(direct=True)
Results in:
conventional
E(SCF) = -76.003846206182 in 15 iterations
Convergence:
FPS-SPF = 5.917280296468369e-09
RMS(P) = 6.09e-09
dE(SCF) = 1.57e-08
Dipole X = -0.00000000
Dipole Y = 2.10397365
Dipole Z = 0.00000000
direct
E(SCF) = -76.003846206240 in 15 iterations
Convergence:
FPS-SPF = 5.912503216000997e-09
RMS(P) = 6.11e-09
dE(SCF) = 1.57e-08
Dipole X = 0.00000000
Dipole Y = 2.10397365
Dipole Z = 0.00000000
But direct=True
is still very very slow.
from mcmurchie-davidson.
That looks a lot better doesn't it? Direct will be a lot slower as the eri's are being recalculated on every cycle at moment. But the density contraction works ok and given a bigger molecule the Schwartz should help too. Thanks, informative as always.
PS in BOMD.py pretty sure you should be dividing by mass as need acceleration in velocity-verlet ie Force/mass.
from mcmurchie-davidson.
@pwborthwick Thanks! I agree. I'll look at BOMD.py
...I think you are right, but naively making the changes doesn't give me the vibrational period I'd expect, so there might be something else missing.
from mcmurchie-davidson.
from mcmurchie-davidson.
@pwborthwick Thanks! I agree. I'll look at
BOMD.py
...I think you are right, but naively making the changes doesn't give me the vibrational period I'd expect, so there might be something else missing.
You are using atomic mass units? Multiply by 1822.8839 to bring to atomic units. Is this why you're not getting the the right quantitative results? See psi4numpty. Psi4numpty still doesn't agree even if you divide by amu2au factor in your program. They use the half-step version of velocity-verlet but that is ok.
I'm getting a problem with BOMD and H2 for dz basis. Diis is failing with singular matrix (iteration 34). I've also had this problem in my program... I've had to trap error switch off diis and return the last Fock matrix for the scf to continue without diis.
Best, Peter
from mcmurchie-davidson.
Related Issues (18)
- Bug in integral code HOT 1
- Handling of complex arithmetic HOT 9
- Test suite organization
- Angular Momentum HOT 7
- Combinations HOT 4
- Changing source code HOT 3
- Wrong orbital energy of He with cc-pVTZ HOT 2
- Tests fail on Apple M1 HOT 5
- Scf HOT 2
- Question: Does the ERI routine require that E and R routines both be computed using Hermite Integrals?
- grad.pyx: ln 282 and ln 335 HOT 6
- FCI Eigenvectors HOT 6
- H2O/6-31++G** SCF not convering HOT 3
- Do you have any plans to put in the capability of CCSD(T) some time? HOT 11
- BOMD HOT 2
- Real Time Magnus HOT 14
- Speed up by detecting which two-e integrals are zeros? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcmurchie-davidson.