def test_growing_string_climbing(gs_kwargs_, opt_ref_cycle, tsopt_ref_cycle): calc = AnaPot() geoms = calc.get_path(num=2) gs_kwargs = { "perp_thresh": 0.5, "reparam_check": "rms", } gs_kwargs.update(gs_kwargs_) cos = GrowingString(geoms, lambda: AnaPot(), **gs_kwargs) opt_kwargs = { "gamma_mult": True, "max_step": 0.04, "rms_force": 0.1, "rms_force_only": True, } opt = StringOptimizer(cos, **opt_kwargs) opt.run() assert opt.is_converged assert opt.cur_cycle == opt_ref_cycle # calc = AnaPot() # calc.anim_opt(opt, show=True) hei_geom = cos.images[cos.get_hei_index()] tsopt = RSIRFOptimizer(hei_geom, thresh="gau_vtight") tsopt.run() assert tsopt.is_converged assert tsopt.cur_cycle == tsopt_ref_cycle
def test_neb_springs(neb_kwargs, ref_cycle): calc = AnaPot() geoms = calc.get_path(15) neb = NEB(geoms, **neb_kwargs) opt = SteepestDescent(neb) opt.run() # calc.anim_opt(opt, show=True) assert (opt.is_converged) assert (opt.cur_cycle == ref_cycle)
def test_freeend_anapot(): calc = AnaPot() geoms = calc.get_path(15) geoms = geoms[3:11] fe_neb = FreeEndNEB(geoms) opt = SteepestDescent(fe_neb) opt.run() # calc.anim_opt(opt, show=True) assert opt.is_converged assert opt.cur_cycle == 31
def test_anapot_aneb(): calc = AnaPot() all_geoms = calc.get_path(10) aneb = AdaptiveNEB(all_geoms) opt_kwargs = { "rms_force": 3e-3, } opt = ConjugateGradient(aneb, **opt_kwargs) opt.run() # ap = calc.anim_opt(opt, show=True) assert opt.is_converged assert opt.cur_cycle == 21
def test_conjugate_gradient(): calc = AnaPot() geoms = calc.get_path(2) gs_kwargs = { "perp_thresh": 0.5, "reparam_check": "rms", } gs = GrowingString(geoms, lambda: AnaPot(), **gs_kwargs) opt_kwargs = { "keep_last": 0, "rms_force": 0.02, "rms_force_only": True, } opt = StringOptimizer(gs, **opt_kwargs) opt.run() assert opt.is_converged assert opt.cur_cycle == 23
def test_climb_lanczos(): calc = AnaPot() geoms = calc.get_path(2) gs_kwargs = { "perp_thresh": 0.5, "reparam_check": "rms", "climb": True, "climb_rms": 0.2, "climb_lanczos": True, } gs = GrowingString(geoms, lambda: AnaPot(), **gs_kwargs) opt_kwargs = { "keep_last": 0, "rms_force": 0.02, "rms_force_only": True, } opt = StringOptimizer(gs, **opt_kwargs) opt.run() # calc.anim_opt(opt, show=True) assert opt.is_converged assert opt.cur_cycle == 23