Пример #1
0
    def test2(self):
        from pele.storage import Database
        from pele.systems import LJCluster
        np.random.seed(0)

        natoms = 13
        system = LJCluster(natoms)
        pot = system.get_potential()
        mindist = system.get_mindist(niter=1)
        
        db = Database()
        db.addMinimum(pot.getEnergy(_x1), _x1)
        db.addMinimum(pot.getEnergy(_x2), _x2)
        m1, m2 = db.minima()
        
        connect = DoubleEndedConnect(m1, m2, pot, mindist, db, verbosity=10)
        connect.connect()
        self.assertTrue(connect.success())
        
        path = connect.returnPath()
Пример #2
0
    local_connect_params["tsSearchParams"] = tsSearchParams
    local_connect_params["NEBparams"] = NEBparams




myconnect = DoubleEndedConnect(
        min1, min2, pot, mindist, database,
        local_connect_params=local_connect_params,
        )

if (myconnect.graph.areConnected(min1, min2)):
    print "ALERT: The minima are already connected in the database file", dbfile
    print "       Delete it for a fresh run."

myconnect.connect()
print ""
print "found a path!"



#the path is now saved in the database.  Lets retrieve it and 
#print it in a more visual format
#now retrieve the path for printing
print ""
mints, S, energies = myconnect.returnPath()
nmin = (len(mints)-1)/2 + 1
nts = nmin-1
print "the path has %d minima and %d transition states" % (nmin, nts)
eofs = "path.EofS"
print "saving energies to", eofs 
Пример #3
0
    NEBparams["image_density"] = 15
    NEBparams["NEBquenchParams"] = NEBquenchParams

    local_connect_params = dict()
    local_connect_params["tsSearchParams"] = tsSearchParams
    local_connect_params["NEBparams"] = NEBparams

myconnect = DoubleEndedConnect(min1, min2, pot, mindist, database,
                               local_connect_params=local_connect_params,
)

if (myconnect.graph.areConnected(min1, min2)):
    print "ALERT: The minima are already connected in the database file", dbfile
    print "       Delete it for a fresh run."

myconnect.connect()
print ""
print "found a path!"



# the path is now saved in the database.  Lets retrieve it and 
# print it in a more visual format
# now retrieve the path for printing
print ""
mints, S, energies = myconnect.returnPath()
nmin = (len(mints) - 1) / 2 + 1
nts = nmin - 1
print "the path has %d minima and %d transition states" % (nmin, nts)
eofs = "path.EofS"
print "saving energies to", eofs