Example #1
0
 def get_compare_exact(self, **kwargs):
     if self.pot.periodic:
         permlist = self.get_permlist()
         boxlengths = np.ones(3) * self.pot.boxl
         measure = MeasurePeriodic(boxlengths, permlist)
         return ExactMatchPeriodic(measure, accuracy=.1)
     else:
         return BLJCluster.get_compare_exact(self, **kwargs)
Example #2
0
 def get_compare_exact(self, **kwargs):
     if self.pot.periodic:
         permlist = self.get_permlist()
         boxlengths = np.ones(3) * self.pot.boxl
         measure = MeasurePeriodic(boxlengths, permlist)
         return ExactMatchPeriodic(measure, accuracy=.1)
     else:
         return BLJCluster.get_compare_exact(self, **kwargs)
Example #3
0

def start():
    wnd.start()


if __name__ == "__main__":
    from OpenGL.GLUT import glutInit
    import sys
    import pylab as pl

    app = QtGui.QApplication(sys.argv)
    from pygmin.systems import LJCluster, BLJCluster
    pl.ion()
    natoms = 13
    system = BLJCluster(natoms)
    system.params.double_ended_connect.local_connect_params.NEBparams.iter_density = 5.
    dbname = "lj%dtest.db" % (natoms, )
    db = system.create_database()  #dbname)

    #get some minima
    if True:
        bh = system.get_basinhopping(database=db)
        bh.run(20)
        minima = db.minima()
    else:
        x1, e1 = system.get_random_minimized_configuration()[:2]
        x2, e2 = system.get_random_minimized_configuration()[:2]
        min1 = db.addMinimum(e1, x1)
        min2 = db.addMinimum(e2, x2)
        minima = [min1, min2]
Example #4
0
# only testing below here
#

def start():
    wnd.start()

if __name__ == "__main__":
    from OpenGL.GLUT import glutInit
    import sys
    import pylab as pl

    app = QtGui.QApplication(sys.argv)
    from pygmin.systems import LJCluster, BLJCluster
    pl.ion()
    natoms = 13
    system = BLJCluster(natoms)
    system.params.double_ended_connect.local_connect_params.NEBparams.iter_density = 5.
    dbname = "lj%dtest.db" % (natoms,)
    db = system.create_database()#dbname)
    
    #get some minima
    if True:
        bh = system.get_basinhopping(database=db)
        bh.run(20)
        minima = db.minima()
    else:
        x1, e1 = system.get_random_minimized_configuration()[:2]
        x2, e2 = system.get_random_minimized_configuration()[:2]
        min1 = db.addMinimum(e1, x1)
        min2 = db.addMinimum(e2, x2)
        minima = [min1, min2]