예제 #1
0
    def test1(self):
        d = os.path.dirname(__file__)
        fname = os.path.join(d, "coords.lj75.gmin.xyz")
        xyz = read_xyz(open(fname, "r"))
        coords = xyz.coords.reshape(-1)
        print fname
        self.assertEqual(coords.size, 75 * 3)

        permlist = [range(75)]
        match = ExactMatchAtomicCluster(permlist=permlist, can_invert=True)
        calculator = PointGroupOrderCluster(match)
        pgorder = calculator(coords)
        #        print pgorder

        self.assertEqual(pgorder, 20)
예제 #2
0
    def test1(self):
        d = os.path.dirname(__file__)
        dbfname = os.path.join(d, "lj75_very_small_pathsample.sqlite")

        from pele.systems import LJCluster
        natoms = 75
        system = LJCluster(natoms)
        db = system.create_database(dbfname, createdb=False)

        permlist = [range(natoms)]

        ts_min = list(db.minima()) + list(db.transition_states())

        for m in ts_min:
            match = ExactMatchAtomicCluster(permlist=permlist, can_invert=True)
            calculator = PointGroupOrderCluster(match)
            pgorder = calculator(m.coords)
            self.assertEqual(pgorder, m.pgorder)
예제 #3
0
    def test1(self):
        from pele.systems import LJCluster
        natoms = 13
        system = LJCluster(natoms)
        db = system.create_database()
        bh = system.get_basinhopping(db)
        bh.setPrinting(ostream=None)
        while db.minima()[0].energy > -44.3:
            bh.run(10)

        m = db.minima()[0]
        permlist = [range(natoms)]
        match = ExactMatchAtomicCluster(permlist=permlist, can_invert=True)
        calculator = PointGroupOrderCluster(match)
        pgorder = calculator(m.coords)
        #        print pgorder

        self.assertEqual(pgorder, 120)
예제 #4
0
 def get_pgorder(self, coords):
     calculator = PointGroupOrderCluster(self.get_compare_exact())
     return calculator(coords)
예제 #5
0
파일: aasystem.py 프로젝트: spraharsh/pele
 def get_pgorder(self, coords):
     return PointGroupOrderCluster(self.get_compare_exact())(coords)
예제 #6
0
import numpy as np
from pele.mindist import PointGroupOrderCluster
from pele.angleaxis import ExactMatchAACluster

system = TIP4PSystem()
db = system.create_database(db="tip4p_8.sqlite")
pot = system.get_potential()
transform = TransformAngleAxisCluster(system.aasystem)
coords = db.minima()[0].coords
#coords = db.transition_states()[0].coords
energy = pot.getEnergy(coords)
#coords = np.loadtxt("2.txt").flatten()
print energy

match = ExactMatchAACluster(system.aasystem)
get_pgorder = PointGroupOrderCluster(match)

coords = db.minima()[0].coords
hess = pot.NumericalHessian(coords, eps=1e-4)
metric = system.aasystem.metric_tensor(coords)

print get_pgorder(coords)
frq = normalmode_frequencies(hess, metric)
print frq
fvib = logproduct_freq2(frq, 6)[1]
print fvib

beta = 1. / 2.479
for m in db.minima():
    hess = pot.NumericalHessian(m.coords, eps=1e-5)
    metric = system.aasystem.metric_tensor(m.coords)
예제 #7
0
db = system.create_database()
pot = system.get_potential()

bh = system.get_basinhopping(database=db)
bh.run(50)

min1 = db.minima()[0]
coords = min1.coords
print()
print("Done with basinghopping, performing frequency analysis")
print()
#min1 = db.transition_states()[0]

# determine point group order of system
determine_pgorder = PointGroupOrderCluster(system.get_compare_exact())
pgorder = determine_pgorder(min1.coords)
# free energy from symmetry
Fpg = old_div(np.log(pgorder), beta)

# get the hession
e, g, hess = pot.getEnergyGradientHessian(min1.coords)
# TODO: go to reduced coordinates here

# get the eigenvalues
freqs2 = normalmode_frequencies(hess)

# analyze eigenvalues
n, lnf = logproduct_freq2(freqs2, 6)

Ffrq = (n * np.log(beta) + 0.5 * lnf / beta)