Skip to content

Commit 73758d8

Browse files
authored
Add files via upload
Add an experimental method to find a transition state structure. Run the following command: python ieipmain.py spm_test [name of directory] -use_spm. spm_test/[target structure]_A.xyz ref.: Gang Cui and Kai Jiang, "Spring pair method of finding saddle points using the minimum energy path as a compass," Phys. Rev. E 110, 064123 (2024).
1 parent ee9ceaf commit 73758d8

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

multioptpy/ieip.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from multioptpy.OtherMethod.twopshs import twoPSHSlikeMethod
1616
from multioptpy.OtherMethod.elastic_image_pair import ElasticImagePair
1717
from multioptpy.OtherMethod.modelfunction import ModelFunctionOptimizer
18+
from multioptpy.OtherMethod.spring_pair_method import SpringPairMethod
1819

1920
class IEIPConfig:
2021
"""
@@ -174,6 +175,9 @@ def __init__(self, args):
174175
self.dimer_trial_angle = getattr(args, 'dimer_trial_angle', np.pi / 32.0)
175176
self.dimer_max_iterations = getattr(args, 'dimer_max_iterations', 1000)
176177

178+
# Add config flag check if needed
179+
self.use_spm = getattr(args, 'use_spm', False)
180+
177181
# Create output directory
178182
os.mkdir(self.iEIP_FOLDER_DIRECTORY)
179183

@@ -205,7 +209,9 @@ def __init__(self, args):
205209
self.addf_like_method = ADDFlikeMethod(self.config)
206210
self.twoPshs = twoPSHSlikeMethod(self.config)
207211
self.dimer_method = DimerMethod(self.config)
208-
212+
self.spring_pair_method = SpringPairMethod(self.config)
213+
214+
209215

210216
def optimize(self):
211217
"""Load calculation modules based on configuration and run optimization"""
@@ -322,7 +328,13 @@ def optimize(self):
322328
SP_list[0],
323329
self.config.electric_charge_and_multiplicity_list[0],
324330
FIO_img_list[0])
325-
331+
elif getattr(self.config, 'use_spm', False):
332+
print("Using Spring Pair Method (SPM)")
333+
self.spring_pair_method.iteration(
334+
file_directory_list[0],
335+
SP_list[0], element_list_list[0],
336+
self.config.electric_charge_and_multiplicity_list[0],
337+
FIO_img_list[0])
326338
else:
327339
self.elastic_image_pair.iteration(
328340
file_directory_list[0], file_directory_list[1],

multioptpy/interface.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ def call_ieipparser(parser):
133133
parser.add_argument('-dimer_sep','--dimer_separation', help="set dimer separation (default: 0.0001)", type=float, default=0.0001)
134134
parser.add_argument('-dimer_trial_angle','--dimer_trial_angle', help="set dimer trial angle (default: pi/32)", type=float, default=np.pi / 32.0)
135135
parser.add_argument('-dimer_maxiter','--dimer_max_iterations', help="set max iterations for dimer method (default: 1000)", type=int, default=1000)
136+
parser.add_argument('-use_spm','--use_spm', help="Use Spring Pair method for searching direction of TS (default: False)", action='store_true'
137+
)
136138
return parser
137139

138140
def call_optimizeparser(parser):

0 commit comments

Comments
 (0)