Skip to content

Commit 94091d8

Browse files
authored
Redirect to dftd3 and dftd4 package (#7)
* Abandon the pyscf-dftd3 extension. Redirect to dftd3 and dftd4 native interfaces * Update README and exmples
1 parent 60be42c commit 94091d8

File tree

3 files changed

+40
-18
lines changed

3 files changed

+40
-18
lines changed

README.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,35 @@
11
DFT-D3 interface
22
================
33

4-
2021-02-27
4+
pyscf-dftd3 extension is deprecated. It is recommended to use the newest DFTD3
5+
and DFTD4 interfaces hosted at https://github.com/dftd3/simple-dftd3 and
6+
https://github.com/dftd4/dftd4 . They can be installed via pypi packages
57

6-
* Version 0.1
7-
8-
Install
9-
-------
10-
* Install to python site-packages folder
118
```
12-
pip install git+https://github.com/pyscf/dftd3
9+
pip install dftd3 dftd4
1310
```
1411

15-
* Install in a custom folder for development
12+
dftd3 package provides a drop-in replacement of pyscf.dftd3.itrf. For example
13+
1614
```
17-
git clone https://github.com/pyscf/dftd3 /home/abc/local/path
15+
from pyscf import gto
16+
import dftd3.pyscf as d3
17+
18+
mol = gto.M(
19+
atom = ''' O 0.00000000 0.00000000 -0.11081188
20+
H -0.00000000 -0.84695236 0.59109389
21+
H -0.00000000 0.89830571 0.52404783 ''',
22+
basis = 'cc-pvdz')
23+
24+
mf = d3.energy(mol.RHF())
25+
print(mf.kernel())
1826
19-
# Set pyscf extended module path
20-
echo 'export PYSCF_EXT_PATH=/home/abc/local/path:$PYSCF_EXT_PATH' >> ~/.bashrc
27+
mf.Gradients()
28+
mf.kernel()
2129
```
2230

23-
You can find more details of extended modules in the document
24-
[extension modules](http://pyscf.org/install.html#extension-modules)
31+
See also discussions in https://github.com/pyscf/dftd3/issues/3
32+
and the instructions for dftd3
33+
https://dftd3.readthedocs.io/en/latest/api/pyscf.html
34+
and dftd4
35+
https://dftd4.readthedocs.io/en/latest/reference/pyscf.html

examples/00-hf_with_dftd3.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from pyscf import gto
1111
from pyscf import scf
12-
from pyscf import dftd3
12+
import dftd3.pyscf as d3
1313

1414
mol = gto.Mole()
1515
mol.atom = ''' O 0.00000000 0.00000000 -0.11081188
@@ -18,6 +18,8 @@
1818
mol.basis = 'cc-pvdz'
1919
mol.build()
2020

21-
mf = dftd3.dftd3(scf.RHF(mol))
21+
mf = d3.energy(scf.RHF(mol))
2222
print(mf.kernel()) # -75.99396273778923
2323

24+
mf.Gradients()
25+
mf.kernel()

pyscf/dftd3/__init__.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,16 @@
1616
# Author: Qiming Sun <osirpt.sun@gmail.com>
1717
#
1818

19-
__version__ = '0.0.1'
19+
__version__ = '0.0.2'
2020

21-
from pyscf.dftd3 import itrf
22-
from pyscf.dftd3.itrf import dftd3, grad
21+
import warnings
22+
23+
warnings.warn('''
24+
pyscf-dftd3 extension is deprecated. It is recommended to use the newest DFTD3
25+
and DFTD4 interfaces hosted at https://github.com/dftd3/simple-dftd3 and
26+
https://github.com/dftd4/dftd4 . They can be installed via pypi packages
27+
28+
pip install dftd3 dftd4
29+
30+
See also discussions in https://github.com/pyscf/dftd3/issues/3
31+
''')

0 commit comments

Comments
 (0)