Comments (6)
I think you are correct, but I need to take a closer look! Happy to accept PR if you fix and add test, otherwise I'll get to it later.
from mcmurchie-davidson.
By your design, for the six indices t, u, v, tau, nu, phi (five for E and one for Ex), only the one for calling Ex should be with an additional +1, right? If nothing special for the (center == c, x == 2) and (center ==d, x == 2) cases, then I guess this might be a mistake.
After removing the +1 for both two lines, the existing code run smoothly. I've tested it in calculating forces. As the difference of the final results is negligible, I don't know how to well test the changes. Any thoughts?
from mcmurchie-davidson.
Hi,
Josh's test002.py has commented out a test of McMurchie-Davidson with force reference calculations done on Gaussian 16. (I think Josh commented it out simply because it took time to run). The test is for water and as you see the non-zero values compare as...
reference | mmd
...........................................................
0.097441437 | 0.0974414370 Oy
-0.086300098 | -0.0863000979 Hx
-0.048720718 | -0.0487207185 Hy
All good there!
Having said that I'm sure the extra '+1' in the loop conditions are a typo (could it be a cut-and-paste problem). I've 'corrected?' the code in my version of mmd and re-compiled the cython and it makes no difference at all to the printed accuracy of the results for this molecule. Unfortunately I couldn't make a direct comparison with my gradient implementation because I've parameterized the loop blocks reducing the 4x3 blocks to just one and a calling loop, but that enforces that there is only one doubly augmented loop in each block. I've had a quick look at Helgaker and couldn't see where the extra 1 might come from.
from mcmurchie-davidson.
@pwborthwick , I also think this should be a typo caused by cut-and-paste. After checking the code path, I think the extra '+1' does not do actual harm for the force calculation test case:
In the case r1z == 0, the last value of the index v is n1+n2+1. Calling E(int i,int j,int t,double Qx,double a,double b, int n, double Ax), which is defined in util.pyx, we will take the n == 0 and t > (i +j) code path (line 17 and 18). Zero will be returned. So the final value should be the same; but some CPU cycles are wasted in doing more loops.
from mcmurchie-davidson.
Thanks all. I agree this is a bug, but thankfully not one that affects the results. I've done multiple tests now and it seems to have no affect beyond performance.
from mcmurchie-davidson.
Fixed in 2f8b77d
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?
- 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
- SCF-Direct HOT 6
- 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.