예제 #1
0
 def createNEB(self, coords1, coords2):
     pot = self.get_potential()
     #dist = np.linalg.norm(coords1- coords2)
     #if dist < 1.: dist = 1
     #image_density = 15.
     
     #path = InterpolatedPathDensity(coords1, coords2, 
     #                               distance=dist, density=image_density)
     path = tip4p.get_path(self.aasystem, coords1, coords2, self.params.neb.nimages)
                           
     if(self.params.neb.aadist):
         return NEB(path, pot, k = self.params.neb.k, distance=self.aasystem.neb_distance)
     else:
         return NEB(path, pot, k = self.params.neb.k)
예제 #2
0
coords2 = np.loadtxt("coords2.txt")
print pot.getEnergy(coords1), pot.getEnergy(coords2)

defaults.NEBquenchParams["nsteps"] = 200
defaults.NEBquenchParams["iprint"] = 1
defaults.NEBquenchParams["maxstep"] = 0.1
defaults.NEBquenchParams["maxErise"] = 0.1
defaults.NEBquenchParams["tol"] = 1e-6
defaults.NEBquenchRoutine = mylbfgs
k = 10.
nimages=50
dneb=True

#print coords2[-6:],coords1[-6:]   

path = tip4p.get_path(system, coords1, coords2, nimages)
path_energy = [pot.getEnergy(coords) for coords in path]
# try the old neb
dump_path("interpolate.xyz", system, path)

neb = NEB(path, pot, k=k, dneb=dneb, with_springenergy = False)
neb.optimize()
neb_1 = neb.copy()
dump_path("neb1.xyz", system, neb_1.coords)
neb.optimize()
neb_2 = neb
dump_path("neb2.xyz", system, neb_2.coords)

# try the new neb
aaneb = NEB(path, pot, distance=system.neb_distance, k=k/20., dneb=dneb, with_springenergy = False)
aaneb.optimize()
예제 #3
0
NEBquenchParams["tol"] = 1e-6
NEBquenchRoutine = mylbfgs
decp = dict()
decp["local_connect_params"] = dict()
decp["local_connect_params"]["NEBparams"] = dict()
decp["local_connect_params"]["NEBparams"]["NEBquenchParams"] = NEBquenchParams
decp["local_connect_params"]["NEBparams"][
    "NEBquenchRoutine"] = NEBquenchRoutine

k = 10.
nimages = 50
dneb = True

#print coords2[-6:],coords1[-6:]

path = tip4p.get_path(system, coords1, coords2, nimages)
path_energy = [pot.getEnergy(coords) for coords in path]
# try the old neb
dump_path("interpolate.xyz", system, path)

neb = NEB(path, pot, k=k, dneb=dneb, with_springenergy=False)
neb.optimize()
neb_1 = neb.copy()
dump_path("neb1.xyz", system, neb_1.coords)
neb.optimize()
neb_2 = neb
dump_path("neb2.xyz", system, neb_2.coords)

# try the new neb
aaneb = NEB(path,
            pot,