Esempio n. 1
0
    def on_buttonBox_accepted(self):
        self.get_input()
        self.close()

    def on_buttonBox_rejected(self):
        self.close()

if __name__ == "__main__":
    # create a pop up window to get the number of atoms
    app = QtGui.QApplication(sys.argv)
    dialog = BLJDialog()
    dialog.exec_()
    
    if dialog.natoms is None:
        sys.exit()

    print(dialog.ntypeA, "A atoms interacting with eps", dialog.epsAA, "sig", dialog.sigAA)
    print(dialog.natoms - dialog.ntypeA, "B atoms interacting with eps", dialog.epsBB, "sig", dialog.sigBB)
    print("The A and B atoms interact with eps", dialog.epsAB, "sig", dialog.sigAB)
    
    # create the system and start the gui
    # (note: since the application is already started we need to pass it to run_gui)
    system = BLJCluster(dialog.natoms, dialog.ntypeA,
                        sigAB=dialog.sigAB,
                        epsAB=dialog.epsAB,
                        sigBB=dialog.sigBB,
                        epsBB=dialog.epsBB,
                        )
    run_gui(system, application=app)
Esempio n. 2
0
 def setUp(self):
     self.natoms = 13
     self.ntypeA = 8
     self.system = BLJCluster(self.natoms, self.ntypeA)
Esempio n. 3
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 pele.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]