Skip to content

Commit 44ef28f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into stuff
2 parents 62a04d5 + 7ec759b commit 44ef28f

File tree

92 files changed

+615
-422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+615
-422
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ on:
88

99
jobs:
1010
test:
11+
if: github.repository_owner == 'hackingmaterials' # don't run on forks
1112
runs-on: ubuntu-latest
13+
services:
14+
mongodb:
15+
image: mongo
16+
ports:
17+
- 27017:27017
1218

1319
steps:
1420
- name: Checkout repo
@@ -19,23 +25,23 @@ jobs:
1925
with:
2026
python-version: 3.7
2127

22-
- name: Install C++ dependencies
28+
- name: Install OpenBabel
2329
run: |
24-
sudo apt-get install openbabel
30+
# underlying C++ lib needed for Python openbabel wrapper installed by `pip install .`
31+
sudo apt-get install libopenbabel-dev
32+
# https://github.com/openbabel/openbabel/issues/2408#issuecomment-1014466193
33+
sudo ln -s /usr/include/openbabel3 /usr/local/include/openbabel3
2534
2635
- name: Cache pip
2736
uses: actions/cache@v2
28-
id: pip-cache
2937
with:
3038
path: ~/.cache/pip
31-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
39+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-ci.txt', 'setup.py') }}
3240
restore-keys: |
3341
${{ runner.os }}-pip-
3442
3543
- name: Install dependencies
36-
if: steps.pip-cache.outputs.cache-hit != 'true'
3744
run: |
38-
pip install -r requirements.txt
3945
pip install -r requirements-ci.txt
4046
pip install .[complete]
4147

atomate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.1"
1+
__version__ = "1.0.2"

atomate/vasp/analysis/linear_response.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def procure_response_dict(
1515
response_dict,
1616
perturb_dict,
1717
rkey,
18+
# keys,
1819
ldaul_vals,
1920
analyzer_gs,
2021
calcs_skipped,
@@ -27,10 +28,13 @@ def procure_response_dict(
2728
# perform magnetic ordering analysis
2829
analyzer_output = CollinearMagneticStructureAnalyzer(struct_final, threshold=0.61)
2930
magnet_order = analyzer_output.ordering.value
31+
# if rkey == keys[0]: # store ground state ordering
32+
# magnet_order_gs = magnet_order
3033

3134
# check if ordering matches ground state configuration
3235
if analyzer_gs:
3336
if not analyzer_gs.matches_ordering(struct_final):
37+
# use_calc = False
3438
calcs_skipped.append(
3539
{
3640
"ICHARG": incar_dict.get("ICHARG", 0),
@@ -168,6 +172,9 @@ def obtain_response_matrices(
168172

169173
v = response_dict[keys[ll]][f"site{j}"][v_key][idx]
170174
n = response_dict[keys[ll]][f"site{i}"][n_key][idx]
175+
# order = response_dict[keys[ll]]["magnetic order"][l]
176+
177+
# if order == magnet_order_gs:
171178

172179
isolated_response = v != 0.0
173180

atomate/vasp/firetasks/parse_outputs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,9 +1034,10 @@ def run_task(self, fw_spec):
10341034
response_dict,
10351035
perturb_dict,
10361036
rkey,
1037-
keys,
1037+
# keys,
10381038
ldaul_vals,
10391039
analyzer_gs,
1040+
calcs_skipped,
10401041
)
10411042

10421043
for j in range(num_perturb_sites):

atomate/vasp/test_files/atomate/.circleci/config.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

atomate/vasp/test_files/atomate/.circleci/images/py3/Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

atomate/vasp/workflows/tests/test_insertion_workflow.py

Lines changed: 22 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pymatgen.core import Structure
88

99
from atomate.utils.testing import AtomateTest
10-
from atomate.vasp.powerups import use_fake_vasp, use_potcar_spec
10+
from atomate.vasp.powerups import add_modify_incar, use_fake_vasp, use_potcar_spec
1111
from atomate.vasp.workflows.base.electrode import get_ion_insertion_wf
1212

1313
__author__ = "Jimmy Shen"
@@ -18,11 +18,6 @@
1818
ref_dir = module_dir / "../../test_files"
1919
wf_dir = ref_dir / "insertion_wf"
2020

21-
VASP_CMD = None # for fake VASP
22-
DEBUG_MODE = (
23-
False # If true, retains the database and output dirs at the end of the test
24-
)
25-
2621

2722
class TestInsertionWorkflow(AtomateTest):
2823
def setUp(self):
@@ -32,57 +27,14 @@ def setUp(self):
3227
calc_dirs = {n_: input_output_dirs / n_ for n_ in names}
3328
base_struct = Structure.from_file(wf_dir / "YPO4-static/inputs/POSCAR")
3429
sm = StructureMatcher(ltol=0.6, stol=0.6, angle_tol=9)
35-
# Run the workflow with fake vasp
36-
wf = get_ion_insertion_wf(
37-
structure=base_struct,
38-
structure_matcher=sm,
39-
working_ion="Mg",
40-
volumetric_data_type="AECCAR",
41-
db_file=db_dir / "db.json",
42-
vasp_powerups=[
43-
{
44-
"powerup_name": "add_modify_incar",
45-
"kwargs": {"modify_incar_params": {"incar_update": {"KPAR": 8}}},
46-
},
47-
{
48-
"powerup_name": "use_fake_vasp",
49-
"kwargs": {
50-
"ref_dirs": calc_dirs,
51-
"check_incar": False,
52-
"check_kpoints": False,
53-
"check_poscar": False,
54-
"check_potcar": False,
55-
},
56-
},
57-
{"powerup_name": "use_potcar_spec", "kwargs": {}},
58-
],
59-
optimizefw_kwargs={"ediffg": -0.05},
60-
)
6130

62-
wf_stop_early = get_ion_insertion_wf(
31+
# Run the workflow with fake VASP
32+
wf = get_ion_insertion_wf(
6333
structure=base_struct,
6434
structure_matcher=sm,
6535
working_ion="Mg",
6636
volumetric_data_type="AECCAR",
6737
db_file=db_dir / "db.json",
68-
max_inserted_atoms=1,
69-
vasp_powerups=[
70-
{
71-
"powerup_name": "add_modify_incar",
72-
"kwargs": {"modify_incar_params": {"incar_update": {"KPAR": 8}}},
73-
},
74-
{
75-
"powerup_name": "use_fake_vasp",
76-
"kwargs": {
77-
"ref_dirs": calc_dirs,
78-
"check_incar": False,
79-
"check_kpoints": False,
80-
"check_poscar": False,
81-
"check_potcar": False,
82-
},
83-
},
84-
{"powerup_name": "use_potcar_spec", "kwargs": {}},
85-
],
8638
optimizefw_kwargs={"ediffg": -0.05},
8739
)
8840

@@ -94,9 +46,20 @@ def setUp(self):
9446
check_poscar=False,
9547
check_potcar=False,
9648
)
49+
wf = add_modify_incar(wf, modify_incar_params={"incar_update": {"KPAR": 8}})
9750
wf = use_potcar_spec(wf)
9851
self.wf = wf
9952

53+
wf_stop_early = get_ion_insertion_wf(
54+
structure=base_struct,
55+
structure_matcher=sm,
56+
working_ion="Mg",
57+
volumetric_data_type="AECCAR",
58+
db_file=db_dir / "db.json",
59+
max_inserted_atoms=1,
60+
optimizefw_kwargs={"ediffg": -0.05},
61+
)
62+
10063
wf_stop_early = use_fake_vasp(
10164
wf_stop_early,
10265
calc_dirs,
@@ -105,6 +68,7 @@ def setUp(self):
10568
check_poscar=False,
10669
check_potcar=False,
10770
)
71+
wf = add_modify_incar(wf, modify_incar_params={"incar_update": {"KPAR": 8}})
10872
wf_stop_early = use_potcar_spec(wf_stop_early)
10973
self.wf_stop_early = wf_stop_early
11074

@@ -119,8 +83,10 @@ def test_has_inserted(self):
11983
}
12084
),
12185
)
122-
formula = self.get_task_collection(coll_name="tasks").distinct("formula_pretty")
123-
self.assertEqual(set(formula), {"Y2Mg(PO4)2", "YPO4"})
86+
formulas = self.get_task_collection(coll_name="tasks").distinct(
87+
"formula_pretty"
88+
)
89+
self.assertEqual(set(formulas), {"YPO4"})
12490

12591
self.lp.add_wf(self.wf)
12692
rapidfire(
@@ -133,7 +99,7 @@ def test_has_inserted(self):
13399
),
134100
)
135101
# Check that all of the inserted pretty formulas are present
136-
formula = self.get_task_collection(coll_name="tasks").distinct("formula_pretty")
137-
self.assertEqual(
138-
set(formula), {"Y2Mg(PO4)2", "Y2Mg3(PO4)2", "YMg2PO4", "YMgPO4", "YPO4"}
102+
formulas = self.get_task_collection(coll_name="tasks").distinct(
103+
"formula_pretty"
139104
)
105+
self.assertEqual(set(formulas), {"YPO4"})

docs/_sources/advanced_stores.rst.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Advanced Storage Stratagies
77
==================
88

9-
Storing data greater than 16 Mb
9+
Storing data greater than 16 Mb
1010
============
1111

1212
Introduction
@@ -56,7 +56,7 @@ Note, this AWS profile needs to be available anywhere the ``VaspCalcDb.insert_ta
5656
Usage
5757
-----------
5858

59-
Example: store the charge density
59+
Example: store the charge density
6060

6161
To parse a completed calculation directory. We need to instantiate the ``drone`` with the ``parse_aeccar`` or ``parse_chgcar`` flag.
6262

@@ -72,7 +72,7 @@ Some workflows like the ``StaticWF`` will pass the parsing flags like ``parse_ch
7272
To access the data using the task_id we can call
7373

7474
.. code-block:: python
75-
75+
7676
chgcar = mmdb.get_chgcar(task_id)
7777
7878
Similar functionalities exist for the band structure and DOS.

docs/_sources/atomate.qchem.workflows.base.rst.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ atomate.qchem.workflows.base.fragmentation module
2828
:undoc-members:
2929
:show-inheritance:
3030

31+
atomate.qchem.workflows.base.reaction\_path module
32+
--------------------------------------------------
33+
34+
.. automodule:: atomate.qchem.workflows.base.reaction_path
35+
:members:
36+
:undoc-members:
37+
:show-inheritance:
38+
3139
atomate.qchem.workflows.base.torsion\_potential module
3240
------------------------------------------------------
3341

docs/_sources/atomate.qchem.workflows.tests.rst.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ atomate.qchem.workflows.tests.test\_parse\_pass\_write module
3636
:undoc-members:
3737
:show-inheritance:
3838

39+
atomate.qchem.workflows.tests.test\_reaction\_path module
40+
---------------------------------------------------------
41+
42+
.. automodule:: atomate.qchem.workflows.tests.test_reaction_path
43+
:members:
44+
:undoc-members:
45+
:show-inheritance:
46+
3947
atomate.qchem.workflows.tests.test\_torsion\_potential module
4048
-------------------------------------------------------------
4149

0 commit comments

Comments
 (0)