Esempio n. 1
0
from lj_run import LJClusterNew
import sys
from pele.landscape import Graph

natoms = int(sys.argv[1])
dbname = sys.argv[2]

system = LJClusterNew(natoms)
db = system.create_database(dbname)

while True:
    min1 = db.minima()[0]

    graph = Graph(db)

    all_connected = True
    for m2 in db.minima()[1:]:
        if not graph.areConnected(min1, m2):
            all_connected = False
            break
    if all_connected:
        print "minima are all connected, ending"
        exit(1) 

    connect = system.get_double_ended_connect(min1, m2, db, fresh_connect=True, load_no_distances=True)
    connect.connect()


Esempio n. 2
0
        for i in range(len(configs)):
            if np.random.uniform(0, 1) < prob:
                x, energy = self.get_starting_configuration_minima(Emax)
                configs[i] = Replica(x, energy, from_random=False)
                if self.verbose:
                    print "sampling from minima, E minimum:", energy, "with probability:", prob
        return configs


if __name__ == "__main__":
    # define the system
    from lj_run import LJClusterNew
    natoms = 13
    system = LJClusterNew(natoms)

    db = system.create_database("lj%d.db" % (natoms))
    #    if True:
    #        populate_database(system, db, niter=100)

    print "pgorder", db.minima()[0].pgorder
    print "fvib", db.minima()[0].fvib
    get_thermodynamic_information(system, db)
    print "pgorder", db.minima()[0].pgorder
    print "fvib", db.minima()[0].fvib

    Emin = db.minima()[0].energy
    Emax = Emin + 1.

    k = system.k
    for i in range(10):
        coords, E = sample_from_database(system, db, Emax)
Esempio n. 3
0
import numpy as np

from lj_run import LJClusterNew
from pygmin.takestep import RandomDisplacement, AdaptiveStepsize, Reseeding

if __name__ == "__main__":
    natoms = 75
    system = LJClusterNew(natoms)
    
    ts = RandomDisplacement(stepsize=0.42)
    takestep = AdaptiveStepsize(ts)
    takestep = Reseeding(takestep,system.get_random_configuration(),maxnoimprove=80)

    label = "lj%d" % (natoms)
    dbname = label + ".db"
    db = system.create_database(dbname)
    bh = system.get_basinhopping(database=db, takestep=ts, temperature=0.45, insert_rejected=True)
    bh.run(1000000)
        

    
    
Esempio n. 4
0
File: _sens.py Progetto: js850/sens
        prob = onset_prob / float(self.nreplicas)
        for i in range(len(configs)):
            if np.random.uniform(0,1) < prob:
                x, energy = self.get_starting_configuration_minima(Emax)
                configs[i] = Replica(x, energy, from_random=False)
                if self.verbose:
                    print "sampling from minima, E minimum:", energy, "with probability:", prob
        return configs

if __name__ == "__main__":
    # define the system
    from lj_run import LJClusterNew
    natoms = 13
    system = LJClusterNew(natoms)

    db = system.create_database("lj%d.db" % (natoms))
#    if True:
#        populate_database(system, db, niter=100)
    
    print "pgorder", db.minima()[0].pgorder
    print "fvib", db.minima()[0].fvib
    get_thermodynamic_information(system, db)
    print "pgorder", db.minima()[0].pgorder
    print "fvib", db.minima()[0].fvib
    
    Emin = db.minima()[0].energy
    Emax = Emin + 1.

    k = system.k
    for i in range(10):
        coords, E = sample_from_database(system, db, Emax)