Created
April 7, 2021 08:18
-
-
Save robertodr/9fe552e5e00cc2d220b5b86ada149b00 to your computer and use it in GitHub Desktop.
Example profiling script for D3 gradient with JAX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cProfile | |
from dftd3.dftd3 import D3Configuration, D3_derivatives | |
def main(order, config, charges, coordinates): | |
_ = D3_derivatives(order, config, charges, *coordinates) | |
coordinates = [ | |
4.01376695, | |
-0.42094027, | |
0.00413283, | |
2.37659705, | |
-2.06988695, | |
-0.07118787, | |
3.23930049, | |
2.02346393, | |
0.03394893, | |
6.09063455, | |
-0.5931548, | |
0.05363799, | |
1.40721479, | |
2.12118734, | |
-0.0108338, | |
-4.04214497, | |
0.34532288, | |
-0.03309288, | |
-2.55773675, | |
2.13450991, | |
-0.01370996, | |
-3.05560778, | |
-2.01961834, | |
0.06482139, | |
-6.12485749, | |
0.3304205, | |
-0.12008265, | |
-1.22314224, | |
-1.95250094, | |
0.14005516, | |
] | |
charges = [6, 8, 8, 1, 1, 6, 8, 8, 1, 1] | |
functional = "B3LYP" | |
damping = "zero" | |
#damping = "bj" | |
config = D3Configuration(functional=functional, damp=damping) | |
order = 1 | |
cProfile.run("main(order, config, charges, coordinates)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result of running the script: