From 748ac6c1dd09642a0fdd287c0f7035916df9b924 Mon Sep 17 00:00:00 2001 From: Shirong_Wang Date: Thu, 12 Jan 2023 16:33:37 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index c7d562d..cb23991 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![pypi version](https://img.shields.io/pypi/v/pyAutoMR.svg)](https://pypi.python.org/pypi/pyAutoMR) [![Downloads](https://pepy.tech/badge/pyAutoMR/month)](https://pepy.tech/project/pyAutoMR) [![PyPI Downloads](https://img.shields.io/pypi/dm/pyAutoMR.svg?label=PyPI%20downloads)](https://pypi.org/project/pyAutoMR/) +![GitHub Downloads][gh-downloads] The method used by this program is quite similar to [MOKIT](https://gitlab.com/jxzou/mokit). However, we try to do everything with PySCF and without Gaussian. @@ -73,3 +74,11 @@ and cite every program called by pyAutoMR, such as PySCF, MOKIT, mrh, etc. If you peform calculations involving GVB, please also cite the following two papers > DOI: 10.1021/acs.jctc.8b00854; DOI: 10.1021/acs.jpca.0c05216. + + +[![Ko-Fi][kofi-badge]][kofi] + + +[gh-downloads]: https://img.shields.io/github/downloads/hebrewsnabla/pyAutoMR/total?color=pink&label=GitHub%20Downloads +[kofi-badge]: https://img.shields.io/badge/Ko--fi-Buy%20me%20a%20coffee!-%2346b798.svg +[kofi]: https://ko-fi.com/srwang From f6e832d6411818da0caa03411e58623cf22cb5bf Mon Sep 17 00:00:00 2001 From: hebrewsnabla Date: Sat, 28 Jan 2023 14:43:16 +0800 Subject: [PATCH 2/2] chore: add H2O flipspin example --- .gitignore | 1 + examples/tutorial/04-flipspin.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 examples/tutorial/04-flipspin.py diff --git a/.gitignore b/.gitignore index 4342412..e9c51ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ __pycache__/ +tmp* *pyc /test/ uno.out diff --git a/examples/tutorial/04-flipspin.py b/examples/tutorial/04-flipspin.py new file mode 100644 index 0000000..e27dee1 --- /dev/null +++ b/examples/tutorial/04-flipspin.py @@ -0,0 +1,24 @@ +from automr import guess +from pyscf import scf, fci, lib +import numpy + +lib.num_threads(4) + +bl = 2.0 +theta = 104.52 * numpy.pi / 180.0 / 2.0 +z_coord = bl * numpy.cos(theta) +y_coord = bl * numpy.sin(theta) + +atoms = f"O 0.00000000 0.00000000 0.00000000\n" +atoms += f"H 0.00000000 {y_coord: 12.8f} {z_coord: 12.8f}\n" +atoms += f"H 0.00000000 {-y_coord: 12.8f} {z_coord: 12.8f}\n" + +bas = 'sto-3g' + +#mf = guess.mix(atoms, bas, conv='tight', level_shift=0.2) +mf = guess.flipspin(atoms, bas, 4, 'site', site=[0]) +mf.analyze() + +rhf = scf.RHF(mf.mol).run() +full = fci.FCI(rhf).run() +print(full.e_tot)