Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make input output consistency #14

Merged
merged 4 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading