Skip to content

Commit

Permalink
Merge pull request #14 from pyiron/make_input_output_consistency
Browse files Browse the repository at this point in the history
Make input output consistency
  • Loading branch information
samwaseda authored Nov 19, 2024
2 parents 4b9c15b + f449455 commit c0c2aaa
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
16 changes: 16 additions & 0 deletions stinx/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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,
)
3 changes: 1 addition & 2 deletions stinx/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="relaxHist.sx", 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
Expand Down
6 changes: 6 additions & 0 deletions stinx/src/input_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1029,3 +1029,9 @@ 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 optimization. It should be used after an electronic loop.
file:
data_type: str
required: true
description: The file to write the forces to.

0 comments on commit c0c2aaa

Please sign in to comment.