Beispiel #1
0
def run_gui(system, db=None):
    import pele.gui.run as gr
    gr.run_gui(system, db=db)
Beispiel #2
0
    def draw(self, coordsl, index):
        from OpenGL import GL,GLUT
        coords=coordsl.reshape(coordsl.size/3,3)
        #coords = coords.reshape(GMIN.getNAtoms, 3)
        com=np.mean(coords, axis=0)                  
        for xx in coords:
            x = xx-com
            GL.glPushMatrix()            
            GL.glTranslate(x[0],x[1],x[2])
            GLUT.glutSolidSphere(0.3,30,30)
            GL.glPopMatrix()

        # get bond list from amber params 
        mol = readAmb.readAmberParam()
        mol.populateBondConn() 
        
        # draw bonds  
        for atomPairs in mol.bondConn:
            xyz1 = coords[atomPairs[0]-1] - com  
            xyz2 = coords[atomPairs[1]-1] - com 
            self.drawCylinder(xyz1, xyz2)            
                     
    def createNEB(self, coords1, coords2):
        pot = gminpot.GMINPotental(GMIN)
        return NEB.NEB(coords1, coords2, pot, k = 100. ,nimages=20)

               
if __name__ == "__main__":
    import pele.gui.run as gr
    gr.run_gui(molSystem)
Beispiel #3
0
def run_gui(system):
    import pele.gui.run as gr
    gr.run_gui(system)
Beispiel #4
0
#print 'GMIN POTENTIAL' 
#sys   = AMBERSystem_GMIN('coords.prmtop', 'coords.inpcrd')        
#sys.test_potential('coords.pdb')

# openmm potential is ~6x slower than gmin potential 
print('OPENmm POTENTIAL') 
sys  = AMBERSystem_OpenMM('coords.prmtop', 'coords.inpcrd')
sys.test_potential('coords.pdb')

# create new database  
from pele.storage import Database
dbcurr = sys.create_database()
                    
# ------- TEST gui 
from pele.gui import run as gr    
gr.run_gui(sys, db=dbcurr)

# ------ Test potential 
sys.test_potential('coords.pdb')
    
# ------ BH 
start = time.clock()
sys.test_BH(dbcurr)
elapsed = (time.clock() - start)
print("time taken by BH = ", elapsed) 

exit() 
# ------- Connect runs 
sys.test_connect(dbcurr)  
    
# ------- Disconn graph  
Beispiel #5
0
from pele.amber import amberSystem 

# create new amber system
sys   = amberSystem.AMBERSystem('coords.prmtop', 'coords.inpcrd')        

#start the gui 
from pele.gui import run as gr    
gr.run_gui(sys)
Beispiel #6
0
import gmin_ as GMIN
from pele.potentials import GMINPotential
from pele.systems import LJCluster
import numpy as np

class GUPTASystem(LJCluster):
    def __init__(self):
        GMIN.initialize()
        self.natoms = GMIN.getNAtoms()
        super(GUPTASystem, self).__init__(self.natoms)

        qp = self.params.structural_quench_params
        qp["tol"]=1e-5
        qp["maxErise"]=1e-5
        qp["maxstep"]=0.1
        qp["iprint"]=-1
        qp["debug"]=False
        
        neb = self.params.double_ended_connect.local_connect_params.NEBparams
        neb["image_density"]=5
        neb["adjustk_freq"]=5

    
    def get_potential(self):
        return GMINPotential(GMIN)
    
if __name__ == "__main__":
    import pele.gui.run as gr
    gr.run_gui(GUPTASystem)
Beispiel #7
0
from pele.amber.amberSystem import AMBERSystem 
from pele.gui import run as gr    

sysAmb  = AMBERSystem('coords.prmtop', 'coords.inpcrd')
gr.run_gui(sysAmb, db="optimdb.sqlite")

Beispiel #8
0
from pele.amber import amberSystem

# create new amber system
system = amberSystem.AMBERSystem('coords.prmtop', 'coords.inpcrd')
database = system.create_database("optimdb.sqlite")

#start the gui
from pele.gui import run as gr
gr.run_gui(system, db=database)
Beispiel #9
0
from pele.amber import amberSystem

# create new amber system
sys = amberSystem.AMBERSystem('coords.prmtop', 'coords.inpcrd')

#start the gui
from pele.gui import run as gr
gr.run_gui(sys)
Beispiel #10
0
        self.render_scale = 0.1
        self.atom_types = system.get_atomtypes()

        self.draw_bonds = []
        for i in xrange(nrigid):
            self.draw_bonds.append((3 * i, 3 * i + 1))
            self.draw_bonds.append((3 * i, 3 * i + 2))

        return system

    def get_compare_exact(self, **kwargs):
        return ExactMatchAACluster(self.aasystem,
                                   accuracy=0.1,
                                   tol=0.07,
                                   **kwargs)

    def get_mindist(self, **kwargs):
        return MinPermDistAACluster(self.aasystem,
                                    accuracy=0.1,
                                    tol=0.07,
                                    **kwargs)

    def get_potential(self):
        return self.potential


if __name__ == "__main__":
    import pele.gui.run as gr
    gr.run_gui(PAPSystem, db="pap.sqlite")
Beispiel #11
0
from pele.amber import amberSystem 

# create new amber system
system   = amberSystem.AMBERSystem('coords.prmtop', 'coords.inpcrd')
database = system.create_database("optimdb.sqlite")    

#start the gui 
from pele.gui import run as gr    
gr.run_gui(system, db=database)
Beispiel #12
0
#print 'GMIN POTENTIAL' 
#sys   = AMBERSystem_GMIN('coords.prmtop', 'coords.inpcrd')        
#sys.test_potential('coords.pdb')

# openmm potential is ~6x slower than gmin potential 
print 'OPENmm POTENTIAL' 
sys  = AMBERSystem_OpenMM('coords.prmtop', 'coords.inpcrd')
sys.test_potential('coords.pdb')

# create new database  
from pele.storage import Database
dbcurr = sys.create_database()
                    
# ------- TEST gui 
from pele.gui import run as gr    
gr.run_gui(sys, db=dbcurr)

# ------ Test potential 
sys.test_potential('coords.pdb')
    
# ------ BH 
start = time.clock()
sys.test_BH(dbcurr)
elapsed = (time.clock() - start)
print "time taken by BH = ", elapsed 

exit() 
# ------- Connect runs 
sys.test_connect(dbcurr)  
    
# ------- Disconn graph  
Beispiel #13
0
        water = create_pap()
        
        system = RBTopology()
        system.add_sites([deepcopy(water) for i in xrange(nrigid)])
        self.potential = pot
        self.nrigid = nrigid
        
        self.render_scale = 0.1
        self.atom_types = system.get_atomtypes()
        
        self.draw_bonds = []
        for i in xrange(nrigid):
            self.draw_bonds.append((3*i, 3*i+1))
            self.draw_bonds.append((3*i, 3*i+2))
    
        return system
    
    def get_compare_exact(self, **kwargs):
        return ExactMatchAACluster(self.aasystem, accuracy=0.1, tol=0.07, **kwargs)
    
    def get_mindist(self, **kwargs):
        return MinPermDistAACluster(self.aasystem,accuracy=0.1, tol=0.07, **kwargs)
    
    def get_potential(self):
        return self.potential
    
if __name__ == "__main__":
    import pele.gui.run as gr
    gr.run_gui(PAPSystem, db="pap.sqlite")
Beispiel #14
0
    # create new amber system
    sysAmb = AMBERSystem('../../examples/amber/aladipep/coords.prmtop',
                         '../../examples/amber/aladipep/coords.inpcrd')

    # load existing database
    from pele.storage import Database

    dbcurr = Database(db="../../examples/amber/aladipep/aladipep.db")

    coords = sysAmb.get_random_configuration()
    # aa = sysAmb.get_metric_tensor(coords)

    # ------- TEST gui
    from pele.gui import run as gr

    gr.run_gui(sysAmb)

    # ------ Test potential
    sysAmb.test_potential("../../examples/amber/aladipep/coords.pdb")

    # ------ BH
    nsteps = 100
    sysAmb.test_BH(dbcurr, nsteps)
    exit()

    # ------- Connect runs
    sysAmb.test_connect(dbcurr)

    # ------- Disconn graph
    sysAmb.test_disconn_graph(dbcurr)
Beispiel #15
0
        pot = GMINPotential(GMIN)
        coords = pot.getCoords()        
        nrigid = coords.size / 6

        print "I have %d water molecules in the system"%nrigid
        print "The initial energy is", pot.getEnergy(coords)

        water = tip4p.water()
        
        system = RBTopology()
        system.add_sites([deepcopy(water) for i in xrange(nrigid)])
        self.potential = pot
        self.nrigid = nrigid
        
        self.render_scale = 0.3
        self.atom_types = system.get_atomtypes()
        
        self.draw_bonds = []
        for i in xrange(nrigid):
            self.draw_bonds.append((3*i, 3*i+1))
            self.draw_bonds.append((3*i, 3*i+2))
    
        return system
    
    def get_potential(self):
        return self.potential
    
if __name__ == "__main__":
    import pele.gui.run as gr
    gr.run_gui(TIP4PSystem, db="tip4p_8.sqlite")
Beispiel #16
0
def run_gui(system):
    import pele.gui.run as gr
    gr.run_gui(system)
Beispiel #17
0
def run_gui(system, db=None):
    import pele.gui.run as gr
    gr.run_gui(system, db=db)
Beispiel #18
0
        coords = pot.getCoords()
        nrigid = old_div(coords.size, 6)

        print("I have %d water molecules in the system" % nrigid)
        print("The initial energy is", pot.getEnergy(coords))

        water = tip4p.water()

        system = RBTopology()
        system.add_sites([deepcopy(water) for i in range(nrigid)])
        self.potential = pot
        self.nrigid = nrigid

        self.render_scale = 0.3
        self.atom_types = system.get_atomtypes()

        self.draw_bonds = []
        for i in range(nrigid):
            self.draw_bonds.append((3 * i, 3 * i + 1))
            self.draw_bonds.append((3 * i, 3 * i + 2))

        return system

    def get_potential(self):
        return self.potential


if __name__ == "__main__":
    import pele.gui.run as gr
    gr.run_gui(TIP4PSystem, db="tip4p_8.sqlite")
Beispiel #19
0
if __name__ == "__main__":
    # create new amber system
    sysAmb = AMBERSystem('../../examples/amber/aladipep/coords.prmtop', '../../examples/amber/aladipep/coords.inpcrd')

    # load existing database 
    from pele.storage import Database

    dbcurr = Database(db="../../examples/amber/aladipep/aladipep.db")

    coords = sysAmb.get_random_configuration()
    # aa = sysAmb.get_metric_tensor(coords)

    # ------- TEST gui 
    from pele.gui import run as gr

    gr.run_gui(sysAmb)

    # ------ Test potential 
    sysAmb.test_potential("../../examples/amber/aladipep/coords.pdb")

    # ------ BH 
    nsteps = 100
    sysAmb.test_BH(dbcurr, nsteps)
    exit()

    # ------- Connect runs 
    sysAmb.test_connect(dbcurr)

    # ------- Disconn graph  
    sysAmb.test_disconn_graph(dbcurr)
Beispiel #20
0
def run_gui_disorder(L=10, dbname=None):
    if dbname is None:
        dbname = "xy_%dx%d.sqlite" %(L,L)
    system = create_system(L=L, dbname=dbname)
    db = system.create_database(dbname)
    run_gui(system, db=db)
Beispiel #21
0
Datei: otp.py Projekt: js850/pele
def rungui(system, db=None):
    import pele.gui.run as gr
    from pele.storage import Database
    gr.run_gui(system, db=db)