def do_mindist(nmol=20): system = OTPCluster(nmol) db = system.create_database("test.sqlte") mindist = system.get_mindist() m0 = db.minima()[0] for m1 in db.minima()[1:6]: d, x1, x2 = mindist(m0.coords, m1.coords) print d
def setUp(self): np.random.seed(0) self.nmol = 4 self.system = OTPCluster(self.nmol) pot = self.system.get_potential() self.db = self.system.create_database() self.m1 = self.db.addMinimum(pot.getEnergy(_x1), _x1) self.m2 = self.db.addMinimum(pot.getEnergy(_x2), _x2)
def do_NEB(nmol=20): system = OTPCluster(nmol) db = system.create_database("test.sqlte") mindist = system.get_mindist() pot = system.get_potential() m1 = db.minima()[0] for m2 in db.minima()[1:3]: neb = NEBDriver(pot, m1.coords, m2.coords) neb.run()
def do_connect(nmol=20): system = OTPCluster(nmol) db = system.create_database("test.sqlte") m1 = db.minima()[0] for m2 in db.minima()[1:5]: connect = system.get_double_ended_connect(m1, m2, db, fresh_connect=True) connect.connect()
def do_ts_search(nmol=20): from pele.transition_states import findTransitionState system = OTPCluster(nmol) db = system.create_database("test.sqlte") orthogopt = system.get_orthogonalize_to_zero_eigenvectors() for ts in db.transition_states(): coords = db.transition_states()[0].coords.copy() coords += np.random.uniform(-.5, .5, coords.size) print system.params.double_ended_connect.local_connect_params.tsSearchParams findTransitionState(coords, system.get_potential(), orthogZeroEigs=orthogopt, **system.params.double_ended_connect. local_connect_params.tsSearchParams)
def setUp(self): np.random.seed(0) self.nmol = 3 self.system = OTPCluster(self.nmol) # pot = self.system.get_potential() # self.db = self.system.create_database() # self.m1 = self.db.addMinimum(pot.getEnergy(_x1), _x1) # self.m2 = self.db.addMinimum(pot.getEnergy(_x2), _x2) self.x0 = np.array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 0.517892, 0.575435, 0.632979, 0.531891, 0.576215, 0.620539, 0.540562, 0.5766, 0.612637 ]) from pele.angleaxis.aamindist import TransformAngleAxisCluster self.topology = self.system.aatopology self.transform = TransformAngleAxisCluster(self.topology) self.p0 = np.array(list(range(1, 4)), dtype=float) self.p0 /= np.linalg.norm(self.p0)
def get_random_rbcoords(self): otp = OTPCluster(self.nrigid) ret = otp.get_random_minimized_configuration(tol=100.) return ret.coords
def getdb(nmol=20): system = OTPCluster(nmol) db = system.create_database("test.sqlte") bh = system.get_basinhopping(db) bh.run(20)