TB2Jflows 0.0.1__py3-none-any.whl → 0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- TB2Jflows/ase_siesta.py +43 -36
- TB2Jflows/auto_siesta_TB2J.py +2 -0
- {tb2jflows-0.0.1.dist-info → tb2jflows-0.2.dist-info}/METADATA +3 -2
- tb2jflows-0.2.dist-info/RECORD +9 -0
- {tb2jflows-0.0.1.dist-info → tb2jflows-0.2.dist-info}/WHEEL +1 -1
- tb2jflows-0.0.1.dist-info/RECORD +0 -9
- {tb2jflows-0.0.1.dist-info → tb2jflows-0.2.dist-info/licenses}/LICENSE +0 -0
- {tb2jflows-0.0.1.dist-info → tb2jflows-0.2.dist-info}/top_level.txt +0 -0
TB2Jflows/ase_siesta.py
CHANGED
|
@@ -24,6 +24,7 @@ class SiestaFlow:
|
|
|
24
24
|
restart=True,
|
|
25
25
|
metadata={},
|
|
26
26
|
fdf_arguments={},
|
|
27
|
+
relax_arguments={},
|
|
27
28
|
split_soc=False,
|
|
28
29
|
**kwargs,
|
|
29
30
|
):
|
|
@@ -50,6 +51,7 @@ class SiestaFlow:
|
|
|
50
51
|
self.root_path = root_path
|
|
51
52
|
self.restart = restart
|
|
52
53
|
self.kwargs = kwargs
|
|
54
|
+
self.relax_args = relax_arguments
|
|
53
55
|
|
|
54
56
|
# paths
|
|
55
57
|
self.metadata_path = os.path.join(self.root_path, "metadata.json")
|
|
@@ -158,6 +160,7 @@ class SiestaFlow:
|
|
|
158
160
|
MaxStressTol=0.1,
|
|
159
161
|
NumCGSteps=200,
|
|
160
162
|
):
|
|
163
|
+
print(f"Relaxation in {path}")
|
|
161
164
|
if (
|
|
162
165
|
self.restart
|
|
163
166
|
and self.metadata["already_relaxed"]
|
|
@@ -169,20 +172,20 @@ class SiestaFlow:
|
|
|
169
172
|
old_spin = self.spin
|
|
170
173
|
if use_collinear:
|
|
171
174
|
self.spin = "collinear"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
175
|
+
calc = self.get_calculator(atoms, path=self.relax_path, label=label)
|
|
176
|
+
calc.atoms = atoms
|
|
177
|
+
atoms = calc.relax(
|
|
178
|
+
atoms,
|
|
179
|
+
TypeOfRun=TypeOfRun,
|
|
180
|
+
VariableCell=VariableCell,
|
|
181
|
+
ConstantVolume=ConstantVolume,
|
|
182
|
+
RelaxCellOnly=RelaxCellOnly,
|
|
183
|
+
MaxForceTol=MaxForceTol,
|
|
184
|
+
MaxStressTol=MaxStressTol,
|
|
185
|
+
NumCGSteps=NumCGSteps,
|
|
186
|
+
)
|
|
187
|
+
self.spin = old_spin
|
|
188
|
+
self.relaxed_atoms = atoms
|
|
186
189
|
self.update_metadata(
|
|
187
190
|
{
|
|
188
191
|
"already_relaxed": True,
|
|
@@ -227,19 +230,20 @@ class SiestaFlow:
|
|
|
227
230
|
def scf_calculatoin_split_soc(self, atoms, label="siesta", nscf=False):
|
|
228
231
|
fdf_args = {
|
|
229
232
|
"SOC_split_SR_SO": True,
|
|
230
|
-
#"Spin.OrbitStrength": 3,
|
|
233
|
+
# "Spin.OrbitStrength": 3,
|
|
231
234
|
"SaveHS.so": True,
|
|
232
235
|
"SaveHS": True,
|
|
233
|
-
"Spin.Fix": False,
|
|
236
|
+
"Spin.Fix": False,
|
|
237
|
+
}
|
|
238
|
+
nscf_args = {
|
|
239
|
+
"SCF.DM.Converge": True,
|
|
240
|
+
"SCF.DM.Tolerance": 1e4,
|
|
241
|
+
"SCF.H.Converge": False,
|
|
242
|
+
"SCF.EDM.Converge": False,
|
|
243
|
+
"SCF.Mix.First": False,
|
|
244
|
+
"SCF.Mix": "density",
|
|
245
|
+
"MaxSCFIterations": 1,
|
|
234
246
|
}
|
|
235
|
-
nscf_args={"SCF.DM.Converge": True,
|
|
236
|
-
"SCF.DM.Tolerance": 1e4,
|
|
237
|
-
"SCF.H.Converge": False,
|
|
238
|
-
"SCF.EDM.Converge": False,
|
|
239
|
-
"SCF.Mix.First": False,
|
|
240
|
-
"SCF.Mix": "density",
|
|
241
|
-
"MaxSCFIterations": 1,
|
|
242
|
-
}
|
|
243
247
|
if nscf:
|
|
244
248
|
fdf_args.update(nscf_args)
|
|
245
249
|
|
|
@@ -288,14 +292,17 @@ class SiestaFlow:
|
|
|
288
292
|
)
|
|
289
293
|
|
|
290
294
|
def set_nonscf_params(self):
|
|
291
|
-
nscf_params={
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
295
|
+
nscf_params = {
|
|
296
|
+
"SCF.DM.Converge": False,
|
|
297
|
+
"SCF.DM.Tolerance": 1e4,
|
|
298
|
+
"SCF.H.Converge": False,
|
|
299
|
+
"SCF.EDM.Converge": False,
|
|
300
|
+
"SCF.Mix.First": False,
|
|
301
|
+
"SCF.Mix": "density",
|
|
302
|
+
"MaxSCFIterations": 1,
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
self.fdf_arguments.update(nscf_params)
|
|
299
306
|
|
|
300
307
|
def run_TB2J_split_soc(self, **kwargs):
|
|
301
308
|
path = os.path.join(self.scf_path, "split_soc")
|
|
@@ -352,9 +359,9 @@ class SiestaFlow:
|
|
|
352
359
|
write_path=os.path.join(self.root_path, "TB2J_results_merged"),
|
|
353
360
|
)
|
|
354
361
|
|
|
355
|
-
def runall_collinear(self, atoms, relax=True, scf=True, TB2J=True,
|
|
362
|
+
def runall_collinear(self, atoms, relax=True, scf=True, TB2J=True, **kwargs):
|
|
356
363
|
if relax:
|
|
357
|
-
atoms = self.relax(atoms)
|
|
364
|
+
atoms = self.relax(atoms, **self.relax_args)
|
|
358
365
|
if scf:
|
|
359
366
|
self.scf_calculation_collinear(atoms, label="siesta")
|
|
360
367
|
if TB2J:
|
|
@@ -364,7 +371,7 @@ class SiestaFlow:
|
|
|
364
371
|
self, atoms, relax=True, scf=True, TB2J=True, rotate_type="structure", **kwargs
|
|
365
372
|
):
|
|
366
373
|
if relax:
|
|
367
|
-
atoms = self.relax(atoms)
|
|
374
|
+
atoms = self.relax(atoms, **self.relax_args)
|
|
368
375
|
if scf:
|
|
369
376
|
self.scf_calculation_with_rotations(
|
|
370
377
|
atoms, rotate_type=rotate_type, label="siesta"
|
|
@@ -375,7 +382,7 @@ class SiestaFlow:
|
|
|
375
382
|
|
|
376
383
|
def runall_split_soc(self, atoms, relax=True, scf=True, TB2J=True, **kwargs):
|
|
377
384
|
if relax:
|
|
378
|
-
atoms = self.relax(atoms)
|
|
385
|
+
atoms = self.relax(atoms, **self.relax_args)
|
|
379
386
|
if scf:
|
|
380
387
|
self.scf_calculatoin_split_soc(atoms, label="siesta")
|
|
381
388
|
if TB2J:
|
TB2Jflows/auto_siesta_TB2J.py
CHANGED
|
@@ -52,6 +52,7 @@ def auto_siesta_TB2J(
|
|
|
52
52
|
TB2J=True,
|
|
53
53
|
rotate_type="structure",
|
|
54
54
|
fincore=True,
|
|
55
|
+
relax_kwargs={},
|
|
55
56
|
siesta_kwargs={},
|
|
56
57
|
TB2J_kwargs={},
|
|
57
58
|
fdf_kwargs={},
|
|
@@ -99,6 +100,7 @@ def auto_siesta_TB2J(
|
|
|
99
100
|
fincore=fincore,
|
|
100
101
|
Udict=Udict,
|
|
101
102
|
split_soc=split_soc,
|
|
103
|
+
relax_arguments = relax_kwargs,
|
|
102
104
|
**siesta_kwargs,
|
|
103
105
|
)
|
|
104
106
|
flow.write_metadata()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: TB2Jflows
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2
|
|
4
4
|
Summary: TB2Jflows: Workflows for automatically calculation of exchange parameters using TB2J
|
|
5
5
|
Author: Xu He
|
|
6
6
|
Author-email: mailhexu@gmail.com
|
|
@@ -23,6 +23,7 @@ Dynamic: author-email
|
|
|
23
23
|
Dynamic: classifier
|
|
24
24
|
Dynamic: description
|
|
25
25
|
Dynamic: license
|
|
26
|
+
Dynamic: license-file
|
|
26
27
|
Dynamic: requires-dist
|
|
27
28
|
Dynamic: requires-python
|
|
28
29
|
Dynamic: summary
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
TB2Jflows/__init__.py,sha256=0aRVj9v-u64LxJl7Cyxcr4YUjpeMkBGPuv-nJbxbHOg,100
|
|
2
|
+
TB2Jflows/ase_siesta.py,sha256=tHeiKWszra8sjcJ_7Pq0cOBUC1ZEluRNEeHGj35Oz6M,14476
|
|
3
|
+
TB2Jflows/auto_siesta_TB2J.py,sha256=o1A5Qf0Ru35BY5jwSAIQ2rPXD1mb572LEAQfgNfEVnM,3174
|
|
4
|
+
TB2Jflows/run_abacus.py,sha256=96tZ2n02FFLl8IZf4W_4TvkCcsd6oS1FVEIqhZpY76o,2692
|
|
5
|
+
tb2jflows-0.2.dist-info/licenses/LICENSE,sha256=KNu68sa-XR_2jZJKhDcSnxoNve8jtHgkw_w9PjP1YOk,1315
|
|
6
|
+
tb2jflows-0.2.dist-info/METADATA,sha256=l2Lsj-MqAlL7fizCsUsD94RaqGpg6D-F-1HtmaOesL8,967
|
|
7
|
+
tb2jflows-0.2.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
8
|
+
tb2jflows-0.2.dist-info/top_level.txt,sha256=iYRLHB7ZeHb59fEZLnbqJDymBKWPqfVgmvqd9S51Txw,10
|
|
9
|
+
tb2jflows-0.2.dist-info/RECORD,,
|
tb2jflows-0.0.1.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
TB2Jflows/__init__.py,sha256=0aRVj9v-u64LxJl7Cyxcr4YUjpeMkBGPuv-nJbxbHOg,100
|
|
2
|
-
TB2Jflows/ase_siesta.py,sha256=BagiujWCwUZ6Aj03oRFdAL1DzJ4pw1_upW4G5d9tMXw,14363
|
|
3
|
-
TB2Jflows/auto_siesta_TB2J.py,sha256=c5dviznEbXyO3BJbh-LNBlC9efT7YbdC7ydWxyCJZ5E,3113
|
|
4
|
-
TB2Jflows/run_abacus.py,sha256=96tZ2n02FFLl8IZf4W_4TvkCcsd6oS1FVEIqhZpY76o,2692
|
|
5
|
-
tb2jflows-0.0.1.dist-info/LICENSE,sha256=KNu68sa-XR_2jZJKhDcSnxoNve8jtHgkw_w9PjP1YOk,1315
|
|
6
|
-
tb2jflows-0.0.1.dist-info/METADATA,sha256=avwrwge2xfv6PgTUy92JCpBdqUFrJNbiNlQpurzX7Ss,947
|
|
7
|
-
tb2jflows-0.0.1.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
8
|
-
tb2jflows-0.0.1.dist-info/top_level.txt,sha256=iYRLHB7ZeHb59fEZLnbqJDymBKWPqfVgmvqd9S51Txw,10
|
|
9
|
-
tb2jflows-0.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|