Ejemplo n.º 1
0
from pygmin.potentials.maxneib_blj import MaxNeibsBLJ, MaxNeibsBLJSystem
from pygmin.gui import run_gui

natoms = 20
ntypeA = natoms/2
max_neibs = 4.5
system = MaxNeibsBLJSystem(natoms, ntypeA=ntypeA, max_neibs=max_neibs, rneib=1.7, 
                           epsneibs=12., epsAB=1., epsB=0.01, epsA=0.01,
                           neib_crossover=.05)

dbname = "blj_N%d_NA%d_n%d.db" %(natoms, ntypeA, max_neibs)

run_gui(system)#, db=dbname)
Ejemplo n.º 2
0
system = MaxNeibsBLJSystem(natoms, ntypeA=ntypeA, max_neibs=max_neibs, 
                           neib_crossover=.3,
                           rneib=rneib,
                           epsneibs=6., epsAB=1., epsB=0.01, epsA=0.01, 
                           sigB=1.,
#                           sigA=1.3, sigB=1.3, sigAB=1.,
                           boxl=boxl,
                           only_AB_neibs=only_AB_neibs)
#system.params.basinhopping.outstream = None

if only_AB_neibs:
    onlyAB = "_onlyAB"
else:
    onlyAB = ""
if periodic:
    textboxl = "_boxl%.2f" % boxl
else:
    textboxl = ""
dbname = "blj_N%d_NA%d_n%d%s%s_rneib%.2f.db" %(natoms, ntypeA, max_neibs, textboxl, onlyAB, rneib)
print dbname

gui = True
if gui:
    run_gui(system, db=dbname)
else:
    db=system.create_database(dbname)
    
    bh = system.get_basinhopping(database=db)
    
    bh.run(1000000)
Ejemplo n.º 3
0
from pygmin.potentials.maxneib_blj import MaxNeibsBLJ, MaxNeibsBLJSystem
from pygmin.gui import run_gui

natoms = 20
ntypeA = natoms / 2
max_neibs = 4.5
system = MaxNeibsBLJSystem(natoms,
                           ntypeA=ntypeA,
                           max_neibs=max_neibs,
                           rneib=1.7,
                           epsneibs=12.,
                           epsAB=1.,
                           epsB=0.01,
                           epsA=0.01,
                           neib_crossover=.05)

dbname = "blj_N%d_NA%d_n%d.db" % (natoms, ntypeA, max_neibs)

run_gui(system)  #, db=dbname)
Ejemplo n.º 4
0
        super(MagneticColloidSystem, self).__init__(natoms)
        self.natoms = natoms
        self.box = box
    
    def get_potential(self):
        return MagneticColloidPotential(self.natoms, self.box)
    
    def get_compare_exact(self, **kwargs):
        raise NotImplementedError
    
    def get_mindist(self, **kwargs):
        raise NotImplementedError

   
if __name__ == "__main__":
    natoms = 10
    box = np.array([10.,10.,10.])
    
    pot = MagneticColloidPotential(natoms, box)
    coords = np.random.uniform(0, 1, 3*natoms) * 2. 
    print "starting potential"
    e, grad = pot.getEnergyGradient(coords)
    print "finished potential"
    print e
    
    pot.test_potential(coords)
    
    system = MagneticColloidSystem(natoms, box)
    from pygmin.gui import run_gui
    run_gui(system)
Ejemplo n.º 5
0
        super(MagneticColloidSystem, self).__init__(natoms)
        self.natoms = natoms
        self.box = box

    def get_potential(self):
        return MagneticColloidPotential(self.natoms, self.box)

    def get_compare_exact(self, **kwargs):
        raise NotImplementedError

    def get_mindist(self, **kwargs):
        raise NotImplementedError


if __name__ == "__main__":
    natoms = 10
    box = np.array([10., 10., 10.])

    pot = MagneticColloidPotential(natoms, box)
    coords = np.random.uniform(0, 1, 3 * natoms) * 2.
    print "starting potential"
    e, grad = pot.getEnergyGradient(coords)
    print "finished potential"
    print e

    pot.test_potential(coords)

    system = MagneticColloidSystem(natoms, box)
    from pygmin.gui import run_gui
    run_gui(system)