Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hebrewsnabla/pyAutoMR
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanwsr committed Jan 29, 2023
2 parents ba5897e + f6e832d commit 9c2d0a1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
__pycache__/
tmp*
*pyc
/test/
uno.out
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
24 changes: 24 additions & 0 deletions examples/tutorial/04-flipspin.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 9c2d0a1

Please sign in to comment.