示例#1
0
    def setup_aatopology(self):
        GMIN.initialize()
        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
示例#2
0
    def __init__(self):
        BaseSystem.__init__(self)
        neb_params = BaseParameters()
        self.params["neb"]=neb_params
        
        neb_params["nimages"] = 15
        neb_params["k"] = 10.
        neb_params["aadist"] = True
        
        
        defaults.NEBquenchParams["nsteps"] = 200
        defaults.NEBquenchParams["iprint"] = 1
        defaults.NEBquenchParams["maxstep"] = 0.1
        #defaults.NEBquenchParams["maxErise"] = 0.1
        defaults.NEBquenchParams["tol"] = 1e-6
        defaults.NEBquenchRoutine = fire     
        
        GMIN.initialize()
        pot = GMINPotential(GMIN)
        coords = pot.getCoords()

        nrigid = coords.size / 6
        print "I have %d water molecules in the system"%nrigid

        water = tip4p.water()
        system = RBSystem()
        system.add_sites([deepcopy(water) for i in xrange(nrigid)])
        
        self.aasystem = system
        self.potential = pot
        self.nrigid = nrigid
示例#3
0
    def setup_aatopology(self):
        GMIN.initialize()
        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
示例#4
0
import pylab as pl
from copy import deepcopy, copy
from pygmin.optimize import mylbfgs, fire
from pygmin.angleaxis import RigidFragment, RBSystem
import tip4p
from tip4p import dump_path

# initialize GMIN and potential
GMIN.initialize()
pot = GMINPotential(GMIN)
coords = pot.getCoords()

nrigid = coords.size / 6
print "I have %d water molecules in the system"%nrigid

water = tip4p.water()
#water.S = np.identity(3, dtype="float64")
#water.S*=10.

# define the whole water system
system = RBSystem()
system.add_sites([deepcopy(water) for i in xrange(nrigid)])

# this is an easy access wrapper for coordinates array
ca = system.coords_adapter(coords)

#buildingblocks.rotate(3.0, ca.rotRigid[-1:])
#ret = mylbfgs(coords, pot.getEnergyGradient, iprint=0)
#coords2 = ret[0]
#np.savetxt("coords1_2.txt", coords1)
#np.savetxt("coords2_2.txt", coords2)
示例#5
0
import pylab as pl
from copy import deepcopy, copy
from pele.optimize import mylbfgs
from pele.angleaxis import RigidFragment, RBSystem
import tip4p
from tip4p import dump_path

# initialize GMIN and potential
GMIN.initialize()
pot = GMINPotential(GMIN)
coords = pot.getCoords()

nrigid = old_div(coords.size, 6)
print("I have %d water molecules in the system" % nrigid)

water = tip4p.water()
#water.S = np.identity(3, dtype="float64")
#water.S*=10.

# define the whole water system
system = RBSystem()
system.add_sites([deepcopy(water) for i in range(nrigid)])

# this is an easy access wrapper for coordinates array
ca = system.coords_adapter(coords)

#buildingblocks.rotate(3.0, ca.rotRigid[-1:])
#ret = mylbfgs(coords, pot.getEnergyGradient, iprint=0)
#coords2 = ret[0]
#np.savetxt("coords1_2.txt", coords1)
#np.savetxt("coords2_2.txt", coords2)