-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c54afd3
commit 55b171b
Showing
21 changed files
with
281 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
C2 with GAMESS | ||
-------------- | ||
|
||
.. literalinclude:: ../../examples/C2-gamess/run.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
C2 Quick Simulation | ||
=================== | ||
------------------- | ||
|
||
.. literalinclude:: ../../examples/C2-quicksim/run.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Quicksim | ||
======== | ||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Quicksim | ||
|
||
C2-quicksim | ||
thio-quicksim | ||
|
||
FLARE++ | ||
======= | ||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: FLARE++ | ||
|
||
thio-300K | ||
thio-300K-ex | ||
|
||
GAMESS | ||
======== | ||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: GAMESS | ||
|
||
C2-gamess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Thiophene Quick Simulation | ||
========================== | ||
-------------------------- | ||
|
||
.. literalinclude:: ../../examples/thio-quicksim/run.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Creating Wavefunction | ||
--------------------- | ||
|
||
Important 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: | ||
|
||
>>> from qmcblip.gamess.utils import WavefunctionCreator | ||
|
||
Also create your molecular system: | ||
|
||
>>> from ase import Atoms | ||
>>> atoms = Atoms('C2', [(0,0,-0.7), (0,0, 0.7)]) | ||
|
||
We can now initialize our :obj:`WavefunctionCreator <qmcblip.gamess.utils.WavefunctionCreator>` object. The first argument are our atoms and the second argument is the location of the CHAMP base directory. This is not the directory containing ``vmc.mov1``, but the directory one level up. | ||
|
||
>>> wf = WavefunctionCreator(atoms, '../../champ') | ||
|
||
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)) | ||
|
||
After GAMESS is done we can convert the GAMESS output to CHAMP wavefunction. | ||
|
||
>>> wf.convert_to_champ() | ||
|
||
And we can also quickly make a CHAMP input file (``vmc.inp``). | ||
|
||
>>> input = wf.create_champ_input() | ||
|
||
Here ``input`` is of the :obj:`Settings <qmcblip.champio.Settings>` type. With that we can easily run a CHAMP simulation: | ||
|
||
>>> from qmcblip.champ import CHAMP | ||
>>> atoms.calc = CHAMP(champ_loc='../../champ/bin/vmc.mov1', settings = input) | ||
|
||
For more examples, see :doc:`../examples/examples`. | ||
|
||
.. _`GAMESS documentation`: https://www.msg.chem.iastate.edu/gamess/GAMESS_Manual/docs-input.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Quickly setup | ||
------------- | ||
|
||
QMCblip comes with a quicksim function to quickly perform QMC ML FF simulations. To do a quick FLARE simulation, import: | ||
|
||
>>> from qmcblip.flare.quicksim import quicksim, OTFSettings | ||
|
||
Depending on your system, you might want to use FLARE or FLARE++. To switch between the two, make an :obj:`OTFSettings<qmcblip.flare.quicksim.OTFSettings>` object: | ||
|
||
>>> settings = OTFSettings(theory=OTFSettings.FLARE()) | ||
|
||
In the case you want to do a FLARE++ simulation, do: | ||
|
||
>>> settings = OTFSettings(theory=OTFSettings.FLAREPP()) | ||
|
||
You also need to provide the CHAMP calculator | ||
|
||
>>> from qmcblip.champ import CHAMP | ||
>>> calc = CHAMP(champ_loc="/home/user/bin/vmc.mov1", ncore=4) | ||
|
||
Finally, you also need to setup the molecular system (remember to put a box around it for FLARE): | ||
|
||
>>> from ase import Atoms, units | ||
>>> from ase.atoms import Cell | ||
>>> | ||
>>> atoms = Atoms('C2', [(0,0,-0.61385), (0,0,0.61385)]) | ||
>>> atoms.cell = Cell.fromcellpar([50, 50, 50, 90, 90, 90]) | ||
>>> atoms.pbc=[True, True, True] | ||
|
||
Finally you are ready to perform the simulation. In this case we are performing a simulation of 100 steps with 0.5fs timestep. | ||
|
||
>>> quicksim(atoms, 0.5, 100, calc, settings) | ||
|
||
You can also supply an extra argument to change the CHAMP settings during the simulation. To change the amount of optimization steps at the 10th MD timestep: | ||
|
||
>>> changes = [(10, {'optwf': {'nopt_iter': 10}})] | ||
>>> quicksim(atoms, 0.5, 100, calc, settings, changes=changes) | ||
|
||
For more examples, see :doc:`../examples/examples`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from ase import Atoms | ||
from qmcblip.gamess.utils import WavefunctionCreator | ||
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') | ||
|
||
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.optwf.nopt_iter = 100 | ||
|
||
atoms.calc = CHAMP(champ_loc='../../champ/bin/vmc.mov1', settings = input) | ||
|
||
print(atoms.get_total_energy()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.