Skip to content

Commit

Permalink
Update to v1.0.6
Browse files Browse the repository at this point in the history
* Changes GAMESS to presets

* Small fixes

* Update test

* Added docs warning

* Change test

* Update version
  • Loading branch information
EmielSlootman authored May 2, 2022
1 parent 011f908 commit 453ad9f
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 174 deletions.
17 changes: 12 additions & 5 deletions docs/qmcblip/gamess.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Creating Wavefunction
---------------------

Important warning: this part is currently still experimental and only confirmed to work for C2.
.. warning::
This part is currently still experimental and only confirmed to work for C2.

QMCblip also includes some tools to make the wavefunction for CHAMP using GAMESS. To use it, first import:

Expand All @@ -18,13 +19,11 @@ We can now initialize our :obj:`WavefunctionCreator <qmcblip.gamess.utils.Wavefu

We can now run the GAMESS simulations. See the `GAMESS documentation`_ for more information. Using keywords and dictionaries you can supply additional GAMESS settings or change the defaults. Using the userscr keyword you can supply the location of the USERSCR directory. Usually the ASE GAMESS calculator can find it on its own, but if not you need to supply it.

>>> wf.setup_rhf()
>>> wf.setup_cas(system=dict(mwords=500), drt=dict(nmcc=2, ndoc=2, nval=2))
>>> wf.setup_ci(system=dict(mwords=500), cidrt=dict(nfzc=2, ndoc=2, nval=2))
>>> wf.run_gamess(label='rhf', ...)

After GAMESS is done we can convert the GAMESS output to CHAMP wavefunction.

>>> wf.convert_to_champ()
>>> wf.convert_to_champ('rhf')

And we can also quickly make a CHAMP input file (``vmc.inp``).

Expand All @@ -35,6 +34,14 @@ Here ``input`` is of the :obj:`Settings <qmcblip.champio.Settings>` type. With t
>>> from qmcblip.champ import CHAMP
>>> atoms.calc = CHAMP(champ_loc='../../champ/bin/vmc.mov1', settings = input)

QMCblip also contains some preconfigured GAMESS simulations. Currently QMCblip only has a preset for C2. To make a wavefunction for C2:

>>> from qmcblip.gamess.utils import Presets
>>>
>>> input = Presets.C2().build('../../champ')

It is that easy!

For more examples, see :doc:`../examples/examples`.

.. _`GAMESS documentation`: https://www.msg.chem.iastate.edu/gamess/GAMESS_Manual/docs-input.txt
13 changes: 3 additions & 10 deletions examples/C2-gamess/run.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
from ase import Atoms
from qmcblip.gamess.utils import WavefunctionCreator
from qmcblip.gamess.utils import Presets
from qmcblip.champ import CHAMP
from qmcblip.champio import Settings

atoms = Atoms('C2', [(0,0,-0.7), (0,0, 0.7)])
wf = WavefunctionCreator(atoms, '../../champ')
atoms = Presets.C2().atoms

wf.setup_rhf()
wf.setup_cas(system=dict(mwords=500), drt=dict(nmcc=2, ndoc=2, nval=2))
wf.setup_ci(system=dict(mwords=500), cidrt=dict(nfzc=2, ndoc=2, nval=2))
wf.convert_to_champ()
input = wf.create_champ_input()
input = Presets.C2().build('../../champ')

input.optwf.nopt_iter = 100

Expand Down
4 changes: 2 additions & 2 deletions qmcblip/gamess/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""GAMESS"""

from .utils import WavefunctionCreator
from .utils import WavefunctionCreator, Presets

__all__ = ['WavefunctionCreator']
__all__ = ['WavefunctionCreator', 'Presets']
Loading

0 comments on commit 453ad9f

Please sign in to comment.