Skip to content

Commit 23d5625

Browse files
committed
Edited code to have run_neb_kwargs. neb ts hess.
1 parent 94aa290 commit 23d5625

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

src/ts_workflow_examples/neb_ts_with_hessian/using_newtonnet.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
def neb_ts_hess_irc_newtonnet(
1515
reactant: Atoms,
1616
product: Atoms,
17+
run_neb_kwargs: Dict[str, Any],
1718
calc_kwargs1: Dict[str, Any],
1819
calc_kwargs2: Dict[str, Any],
1920
logger: logging.Logger,
@@ -29,6 +30,8 @@ def neb_ts_hess_irc_newtonnet(
2930
The reactant structure.
3031
product : Atoms
3132
The product structure.
33+
run_neb_kwargs : dict
34+
Keyword arguments for the ASE's nudged elastic band function.
3235
calc_kwargs1 : dict
3336
Keyword arguments for the ASE calculator for NEB and IRC jobs.
3437
calc_kwargs2 : dict
@@ -44,7 +47,12 @@ def neb_ts_hess_irc_newtonnet(
4447
List containing results from NEB, TS, and IRC jobs.
4548
"""
4649
# Create NEB job
47-
job1 = strip_decorator(neb_job)(reactant, product, calc_kwargs=calc_kwargs1)
50+
job1 = strip_decorator(neb_job)(
51+
reactant,
52+
product,
53+
run_neb_kwargs=run_neb_kwargs,
54+
calc_kwargs=calc_kwargs1,
55+
)
4856
logger.info("Created NEB job.")
4957

5058
# Create TS job with custom Hessian
@@ -105,8 +113,17 @@ def neb_ts_hess_irc_newtonnet(
105113
calc_kwargs2 = {
106114
'hess_method': 'autograd',
107115
}
108-
109-
job1, job2, job3, job4 = neb_ts_hess_irc_newtonnet(reactant, product, calc_kwargs1, calc_kwargs2, logger)
116+
run_neb_kwargs = {
117+
'max_steps': 2,
118+
}
119+
job1, job2, job3, job4 = neb_ts_hess_irc_newtonnet(
120+
reactant,
121+
product,
122+
run_neb_kwargs,
123+
calc_kwargs1,
124+
calc_kwargs2,
125+
logger,
126+
)
110127
print('\n\n', job1)
111128
print('\n\n', job2)
112129
print('\n\n', job3)

0 commit comments

Comments
 (0)