Skip to content

Commit

Permalink
bugfix in opt_driver (pyscf#187)
Browse files Browse the repository at this point in the history
* bugfix in opt_driver

* revert unnecessary changes

* unchange dft_driver.py

* delete tmp file
  • Loading branch information
wxj6000 authored Jul 25, 2024
1 parent bda6d41 commit cb3bad4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
2 changes: 2 additions & 0 deletions gpu4pyscf/drivers/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$scan
dihedral 2 1 5 6 100.0 120.0 3
10 changes: 10 additions & 0 deletions gpu4pyscf/drivers/ethane.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
8

C -4.13498124 0.70342204 0.00000000
H -3.53650966 -0.16516720 -0.17967886
H -4.07172084 1.36057017 -0.84205371
H -5.15338585 0.41046458 0.14808100
C -3.62163902 1.42937832 1.25740497
H -3.68306794 2.48719615 1.10858318
H -4.22133413 1.15219316 2.09909028
H -2.60384227 1.15314360 1.43819258
2 changes: 1 addition & 1 deletion gpu4pyscf/drivers/opt_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,6 @@ def callback(envs):
for i, mol_name in enumerate(config['molecules']):
constraints = None
if 'constraints' in config and config['constraints']:
assert len(config['constraints']) == len(config['molecule'])
assert len(config['constraints']) == len(config['molecules'])
constraints = config['constraints'][i]
opt_mol(mol_name, config, constraints, charge=args.charge, spin=args.spin)
21 changes: 13 additions & 8 deletions gpu4pyscf/drivers/opt_sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
"input_dir": "./",
"output_dir": "./",
"molecules": [
"h2o.xyz",
"h2o.xyz",
"h2o.xyz",
"h2o.xyz",
"h2o.xyz"
"ethane.xyz",
"ethane.xyz",
"ethane.xyz",
"ethane.xyz",
"ethane.xyz"
],
"constraints": [
"constraints.txt",
"constraints.txt",
"constraints.txt",
"constraints.txt",
"constraints.txt"
],
"basis": "def2-tzvpp",
"xc": "b3lyp",
Expand All @@ -17,7 +24,5 @@
"method": "CPCM"
},
"with_gpu": true,
"with_df": true,
"with_grad": true,
"with_hess": true
"with_df": true
}]

0 comments on commit cb3bad4

Please sign in to comment.