lineshape_tools 0.1.1__py3-none-any.whl → 0.1.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.
- lineshape_tools/__init__.py +1 -1
- lineshape_tools/cli.py +7 -0
- {lineshape_tools-0.1.1.dist-info → lineshape_tools-0.1.2.dist-info}/METADATA +1 -1
- {lineshape_tools-0.1.1.dist-info → lineshape_tools-0.1.2.dist-info}/RECORD +7 -7
- {lineshape_tools-0.1.1.dist-info → lineshape_tools-0.1.2.dist-info}/WHEEL +1 -1
- {lineshape_tools-0.1.1.dist-info → lineshape_tools-0.1.2.dist-info}/entry_points.txt +0 -0
- {lineshape_tools-0.1.1.dist-info → lineshape_tools-0.1.2.dist-info}/licenses/LICENSE +0 -0
lineshape_tools/__init__.py
CHANGED
lineshape_tools/cli.py
CHANGED
|
@@ -37,6 +37,7 @@ def collect(
|
|
|
37
37
|
rtol: float = 1e-5,
|
|
38
38
|
config_weight: float = 1.0,
|
|
39
39
|
force_weighting: bool = False,
|
|
40
|
+
allow_constraint: bool = False,
|
|
40
41
|
) -> None:
|
|
41
42
|
"""Collect and process data for fine-tuning.
|
|
42
43
|
|
|
@@ -66,6 +67,8 @@ def collect(
|
|
|
66
67
|
force_weighting (bool): store a config_weight that's inversely proportional to the max
|
|
67
68
|
force that any atom feels in the configuration [min(0.02 / max_fpa, 1)]. Overwrites
|
|
68
69
|
the value specified by config_weight.
|
|
70
|
+
allow_constraint (bool): allow constraints on atoms (e.g. selective dynamics) to modify the
|
|
71
|
+
forces. This is typically not desirable.
|
|
69
72
|
"""
|
|
70
73
|
if strategy.lower() not in ("none", "qr", "dx"):
|
|
71
74
|
raise ValueError("invalid strategy choice")
|
|
@@ -79,6 +82,10 @@ def collect(
|
|
|
79
82
|
read_atoms = ase.io.read(fname, read_index)
|
|
80
83
|
total_read += len(read_atoms)
|
|
81
84
|
for atoms in tqdm(read_atoms, desc="[*] processing atoms", disable=len(read_atoms) < 10):
|
|
85
|
+
if len(atoms.constraints) > 0 and not allow_constraint:
|
|
86
|
+
logger.debug("atoms are constrained, removing prior to extracting forces")
|
|
87
|
+
atoms.set_constraint(None)
|
|
88
|
+
|
|
82
89
|
forces = atoms.get_forces()
|
|
83
90
|
if min_force < np.linalg.norm(forces, axis=1).max() < max_force:
|
|
84
91
|
atoms.info["REF_energy"] = atoms.get_potential_energy()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lineshape_tools
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Software to evaluate the optical lineshape function of a defect.
|
|
5
5
|
Keywords: defect,luminescence,absorption,electron-phonon coupling,density functional theory
|
|
6
6
|
Author-Email: "Mark E. Turiansky" <mark.e.turiansky.ctr@us.navy.mil>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
lineshape_tools-0.1.
|
|
2
|
-
lineshape_tools-0.1.
|
|
3
|
-
lineshape_tools-0.1.
|
|
4
|
-
lineshape_tools-0.1.
|
|
5
|
-
lineshape_tools/__init__.py,sha256=
|
|
1
|
+
lineshape_tools-0.1.2.dist-info/METADATA,sha256=BXG4V2PE1x4bPk2pa7fWRbO7wFYFM0vxrgytGqlznVU,3677
|
|
2
|
+
lineshape_tools-0.1.2.dist-info/WHEEL,sha256=Wb0ASbVj8JvWHpOiIpPi7ucfIgJeCi__PzivviEAQFc,90
|
|
3
|
+
lineshape_tools-0.1.2.dist-info/entry_points.txt,sha256=UXygiyrvvwic-jiUrHINzx3lUR27qjyd1BJRY6S1Mdg,86
|
|
4
|
+
lineshape_tools-0.1.2.dist-info/licenses/LICENSE,sha256=2AJLb-6XbTVThSycPkXkvDVAf697F5rbWWY8SicUdf4,1074
|
|
5
|
+
lineshape_tools/__init__.py,sha256=aQaLQQHq0Nyf1_4NNTGKXls23J9qpETklvJXyN6GRpw,213
|
|
6
6
|
lineshape_tools/__main__.py,sha256=X3QJ708vxRsHQhZkYDIDZlwQC0HuBO2bzZmN41KXutM,1250
|
|
7
7
|
lineshape_tools/__pycache__/lineshape._do_compute_phonon_spec_func-128.py311.1.nbc,sha256=_3BI5pjGXDDN1HAB8ZaShO60thkupbe5qfuKJTRXFZM,258854
|
|
8
8
|
lineshape_tools/__pycache__/lineshape._do_compute_phonon_spec_func-128.py311.nbi,sha256=999q880zQH3rZcqOToQ94g1sevjIIQrXRniHGcG88Ck,1752
|
|
@@ -12,9 +12,9 @@ lineshape_tools/__pycache__/lineshape.gaussian-26.py311.1.nbc,sha256=mKBwgnhBXFR
|
|
|
12
12
|
lineshape_tools/__pycache__/lineshape.gaussian-26.py311.nbi,sha256=4i8Jmz968WrJshLUQGQFU0CMn2biEQoxXvsmgGnvN1M,1317
|
|
13
13
|
lineshape_tools/__pycache__/lineshape.lorentzian-32.py311.1.nbc,sha256=PHMHumjybDinzvEgW_045EFobJRldbJhvSbBzZNexfI,28028
|
|
14
14
|
lineshape_tools/__pycache__/lineshape.lorentzian-32.py311.nbi,sha256=VDnI92WrDEOuhT_9dlqIahDhdDOKpAnweuiPHWko8UI,1319
|
|
15
|
-
lineshape_tools/cli.py,sha256=
|
|
15
|
+
lineshape_tools/cli.py,sha256=342cwe19_7Aa3nYvU20OHH-LlIAlcjsZFoDBsvXdZjU,39218
|
|
16
16
|
lineshape_tools/constants.py,sha256=fNcTHWHajyIYbTnEM4sHHygL7MqEuULjZl_Pf2ojrE0,122
|
|
17
17
|
lineshape_tools/lineshape.py,sha256=bkdOi2pt_EiKVkpoMdWvVlYLfvp1AgWOFRVQyR2lBUY,9704
|
|
18
18
|
lineshape_tools/phonon.py,sha256=Lk8zVB_02Vzr-rvrVxqn3Bpj2PhxZSwThWuNSFCfl0c,2350
|
|
19
19
|
lineshape_tools/plot.py,sha256=YEeLWjQSSvid9BCcj0jfl654WGQn0FdNUDY9smCHI3Q,9932
|
|
20
|
-
lineshape_tools-0.1.
|
|
20
|
+
lineshape_tools-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|