def find_escape_paths(minimum, potential, graph, ntries=1, push=1.e-2, push_minrms=1.e-2): print "Single ended search for minimum", minimum._id, minimum.energy search = DimerSearch(minimum.coords, potential, zeroEigenVecs=zeroEV_cluster) for i in xrange(ntries): x_ts, energy_ts, rms, tmp = _uphill_search(minimum.coords, search, push, push_minrms) ret1, ret2 = minima_from_ts(potential, x_ts, displace=1e-2) min1 = graph.addMinimum(ret1[1], ret1[0]) min2 = graph.addMinimum(ret2[1], ret2[0]) if (not min1 is minimum and not min2 is minimum): print "Warning in single ended search: did not find initial minimum during quench from transition state" if (min1 is min2): print "Warning in single ended search: downhill search from transistion state ended in same minimum" ts = graph.addTransitionState(energy_ts, x_ts, min1, min2) print "found transition state: ", min1._id, min2._id, min1.energy, ts.energy, min2.energy search.findNextTS()
def _refineTS(pot, coords, tsSearchParams=dict(), eigenvec0=None): """ find nearest transition state to NEB climbing image. Then fall off the transition state to find the associated minima. This would naturally be a part of DoubleEndedConnect. I separated it to make it more easily parallelizable. """ #run ts search algorithm kwargs = dict(defaults.tsSearchParams.items() + tsSearchParams.items()) ret = findTransitionState(coords, pot, eigenvec0=eigenvec0, **kwargs) #check to make sure it is a valid transition state coords = ret.coords if not ret.success: print "transition state search failed" return False, None if ret.eigenval >= 0.: print "warning: transition state has positive lowest eigenvalue, skipping:", ret.eigenval, ret.energy, ret.rms print " not adding transition state" return False, None #find the minima which this transition state connects print "falling off either side of transition state to find new minima" ret1, ret2 = minima_from_ts(pot.getEnergyGradient, coords, n = ret.eigenvec, \ displace=1e-3, quenchParameters={"tol":1e-7, "iprint":-1}) return True, ret, ret1, ret2
def _refineTS(pot, coords, tsSearchParams=dict(), eigenvec0=None, pushoff_params=dict()): """ find nearest transition state to NEB climbing image. Then fall off the transition state to find the associated minima. This would naturally be a part of DoubleEndedConnect. I separated it to make it more easily parallelizable. """ #run ts search algorithm kwargs = dict(tsSearchParams.items()) ret = findTransitionState(coords, pot, eigenvec0=eigenvec0, **kwargs) #check to make sure it is a valid transition state coords = ret.coords if not ret.success: logger.info("transition state search failed") return False, ret, None, None if ret.eigenval >= 0.: logger.info("transition state has positive lowest eigenvalue, skipping: %s %s %s", ret.eigenval, ret.energy, ret.rms) logger.info( " not adding transition state") return False, ret, None, None #find the minima which this transition state connects logger.info("falling off either side of transition state to find new minima") ret1, ret2 = minima_from_ts(pot, coords, n = ret.eigenvec, \ **pushoff_params) # print "testing", ret1.energy return True, ret, ret1, ret2
def find_escape_paths(minimum, potential, graph, ntries=1, push=1.e-2, push_minrms=1.e-2): print "Single ended search for minimum", minimum._id, minimum.energy search = DimerSearch(minimum.coords, potential, zeroEigenVecs=zeroEV_cluster) for i in xrange(ntries): x_ts, energy_ts, rms, tmp = _uphill_search(minimum.coords, search, push, push_minrms) ret1, ret2 = minima_from_ts(potential, x_ts, displace=1e-2) min1 = graph.addMinimum(ret1[1], ret1[0]) min2 = graph.addMinimum(ret2[1], ret2[0]) if(not min1 is minimum and not min2 is minimum): print "Warning in single ended search: did not find initial minimum during quench from transition state" if(min1 is min2): print "Warning in single ended search: downhill search from transistion state ended in same minimum" ts = graph.addTransitionState(energy_ts, x_ts, min1, min2) print "found transition state: ", min1._id, min2._id, min1.energy,ts.energy,min2.energy search.findNextTS()
def _refineTS(pot, coords, tsSearchParams=dict(), eigenvec0=None, pushoff_params=dict()): """ find nearest transition state to NEB climbing image. Then fall off the transition state to find the associated minima. This would naturally be a part of DoubleEndedConnect. I separated it to make it more easily parallelizable. """ #run ts search algorithm kwargs = dict(tsSearchParams.items()) ret = findTransitionState(coords, pot, eigenvec0=eigenvec0, **kwargs) #check to make sure it is a valid transition state coords = ret.coords if not ret.success: logger.info("transition state search failed") return False, ret, None, None if ret.eigenval >= 0.: logger.info( "transition state has positive lowest eigenvalue, skipping: %s %s %s", ret.eigenval, ret.energy, ret.rms) logger.info(" not adding transition state") return False, ret, None, None #find the minima which this transition state connects logger.info( "falling off either side of transition state to find new minima") ret1, ret2 = minima_from_ts(pot, coords, n = ret.eigenvec, \ **pushoff_params) # print "testing", ret1.energy return True, ret, ret1, ret2