-
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.
Showing
12 changed files
with
111 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
|
||
autodoc_mock_imports = [ | ||
'flare-pp', | ||
'flare_pp', | ||
'matplotlib' | ||
] | ||
|
||
|
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ ase==3.22.1 | |
mir-flare==0.2.4 | ||
numpy==1.20.3 | ||
pydantic==1.9.0 | ||
periodictable==1.6.0 | ||
sgdml==0.4.10 |
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,15 @@ | ||
qmcblip.gamess package | ||
====================== | ||
|
||
.. automodule:: qmcblip.gamess | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Submodules | ||
---------- | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
qmcblip.gamess.utils |
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,7 @@ | ||
qmcblip.gamess.utils module | ||
=========================== | ||
|
||
.. automodule:: qmcblip.gamess.utils | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ Subpackages | |
:maxdepth: 4 | ||
|
||
qmcblip.flare | ||
qmcblip.gamess | ||
qmcblip.sgdml | ||
|
||
Submodules | ||
|
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
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
Empty file.
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,50 @@ | ||
import os | ||
import shutil | ||
import unittest | ||
from pathlib import Path | ||
|
||
import pytest | ||
from ase import Atoms | ||
from qmcblip.champ import CHAMP | ||
from qmcblip.champio import Settings | ||
from qmcblip.gamess.utils import WavefunctionCreator | ||
|
||
found_champ = pytest.mark.skipif( | ||
not Path.home().joinpath(Path('software/champ')).is_dir(), reason="CHAMP not found." | ||
) | ||
found_games = pytest.mark.skipif( | ||
not Path.home().joinpath(Path('software/gamess')).is_dir(), reason="GAMESS not found." | ||
) | ||
|
||
class TestGamess(unittest.TestCase): | ||
|
||
def setUp(self): | ||
if Path.home().joinpath(Path('software/gamess')).is_dir(): | ||
shutil.rmtree(Path.home().joinpath(Path('software/gamess/restart'))) | ||
os.mkdir(Path.home().joinpath(Path('software/gamess/restart'))) | ||
os.mkdir("tests/test_data/temp") | ||
os.chdir('tests/test_data/temp') | ||
|
||
@found_champ | ||
@found_games | ||
def test_gamess(self): | ||
atoms = Atoms('C2', [(0,0,-0.61385), (0,0,0.61385)]) | ||
wf = WavefunctionCreator(atoms, str(Path.home().joinpath('software/champ'))) | ||
wf.setup_rhf(userscr=str(Path.home().joinpath(Path('software/gamess/restart')))) | ||
wf.setup_cas(system=dict(mwords=500), drt=dict(nmcc=2, ndoc=2, nval=2), userscr=str(Path.home().joinpath(Path('software/gamess/restart')))) | ||
wf.setup_ci(system=dict(mwords=500), cidrt=dict(nfzc=2, ndoc=2, nval=2), userscr=str(Path.home().joinpath(Path('software/gamess/restart')))) | ||
wf.convert_to_champ() | ||
input = wf.create_champ_input() | ||
input.optwf.nopt_iter = 10 | ||
input.write('vmc.inp') | ||
atoms.calc = CHAMP(champ_loc=str(Path.home().joinpath('software/champ'))+"/bin/vmc.mov1", settings = input) | ||
|
||
self.assertAlmostEqual(atoms.get_total_energy(), -297.5, places=0) | ||
|
||
def tearDown(self): | ||
os.chdir("../../..") | ||
shutil.rmtree('tests/test_data/temp') | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |