From 5bd05760431f3301a0aca323954618d8bfb61d37 Mon Sep 17 00:00:00 2001 From: samwaseda Date: Mon, 18 Nov 2024 13:57:52 +0000 Subject: [PATCH 1/4] add evalForces --- stinx/output.py | 2 +- stinx/src/input_data.yml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/stinx/output.py b/stinx/output.py index 4877db4..7cfe037 100644 --- a/stinx/output.py +++ b/stinx/output.py @@ -146,7 +146,7 @@ def collect_spins_dat(file_name="spins.dat", cwd=None, index_permutation=None): return {"atom_scf_spins": _splitter(s, spins[:, 0])} -def collect_relaxed_hist(file_name="relaxHist.sx", cwd=None, index_permutation=None): +def collect_relaxed_hist(file_name, cwd=None, index_permutation=None): """ Args: diff --git a/stinx/src/input_data.yml b/stinx/src/input_data.yml index b9eefcd..717078c 100644 --- a/stinx/src/input_data.yml +++ b/stinx/src/input_data.yml @@ -1029,3 +1029,10 @@ sphinx: description: Drift filter bornOppenheimer: alias: sphinx.main.QN.bornOppenheimer + evalForces: + description: The evalForces group is used to calculate forces and write them to a file in sx-format. This is useful for single-point calculations without a structure + file: + data_type: str + required: true + description: The file to write the forces to. +optimization. It should be used after an electronic loop. From bede3942e96aaf9c41ee09699df180842ef4026c Mon Sep 17 00:00:00 2001 From: samwaseda Date: Mon, 18 Nov 2024 13:59:27 +0000 Subject: [PATCH 2/4] typo --- stinx/src/input_data.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stinx/src/input_data.yml b/stinx/src/input_data.yml index 717078c..6461386 100644 --- a/stinx/src/input_data.yml +++ b/stinx/src/input_data.yml @@ -1030,9 +1030,8 @@ sphinx: bornOppenheimer: alias: sphinx.main.QN.bornOppenheimer evalForces: - description: The evalForces group is used to calculate forces and write them to a file in sx-format. This is useful for single-point calculations without a structure + description: The evalForces group is used to calculate forces and write them to a file in sx-format. This is useful for single-point calculations without a structure optimization. It should be used after an electronic loop. file: data_type: str required: true description: The file to write the forces to. -optimization. It should be used after an electronic loop. From 482afc4b79e9d3ffd8bea95285af9e4a7f73496f Mon Sep 17 00:00:00 2001 From: samwaseda Date: Mon, 18 Nov 2024 14:00:36 +0000 Subject: [PATCH 3/4] update input file --- stinx/input.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/stinx/input.py b/stinx/input.py index dcd5602..9c47ed8 100644 --- a/stinx/input.py +++ b/stinx/input.py @@ -991,6 +991,7 @@ def create(**kwargs): ricQN (dict): (Optional) ric (dict): The ric group defines the parameters for internal coordinate generation. (Optional) ricTS (dict): The ricTS group requests a quasi-Newton optimization for 1st-order saddle points (transition states) using updates [11] of an on-the-fly optimized internal-coordinate based initial guess for the Hessian [10]. An initial guess for the reaction coordinate must be known. Note: This is an experimental feature. The optimization should be started within the saddle point region (one negative eigenvalue of the Hesse matrix), otherwise, the algorithm may converge to a different stationary point (a minimum, or a higher-order saddle point). (Optional) + evalForces (dict): The evalForces group is used to calculate forces and write them to a file in sx-format. This is useful for single-point calculations without a structure optimization. It should be used after an electronic loop. (Optional) """ return fill_values(**kwargs) @@ -2305,3 +2306,18 @@ def create( spinScaling=spinScaling, dielecConstant=dielecConstant, ) + + class evalForces: + @staticmethod + def create( + file: str, + ): + """ + The evalForces group is used to calculate forces and write them to a file in sx-format. This is useful for single-point calculations without a structure optimization. It should be used after an electronic loop. + + Args: + file (str): The file to write the forces to. + """ + return fill_values( + file=file, + ) From f4494550806dfbdce1362235f5d7f0cf194d2b7e Mon Sep 17 00:00:00 2001 From: samwaseda Date: Mon, 18 Nov 2024 14:58:58 +0000 Subject: [PATCH 4/4] rename relax_hist to eval_forces following the sphinx convention --- stinx/output.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stinx/output.py b/stinx/output.py index 7cfe037..dc61cf3 100644 --- a/stinx/output.py +++ b/stinx/output.py @@ -146,9 +146,8 @@ def collect_spins_dat(file_name="spins.dat", cwd=None, index_permutation=None): return {"atom_scf_spins": _splitter(s, spins[:, 0])} -def collect_relaxed_hist(file_name, cwd=None, index_permutation=None): +def collect_eval_forces(file_name, cwd=None, index_permutation=None): """ - Args: file_name (str): file name cwd (str): directory path