# creates:  hoppingsummary.png
import matplotlib
matplotlib.use('Agg')
from ase.optimize.minimahopping import MHPlot

execfile('Cu2_Pt110.py')
mhplot = MHPlot()
mhplot.save_figure('hoppingsummary.png')
# Clean up directory.
import os
os.remove('hop.log')
os.remove('minima.traj')
os.remove('qn00000.traj')
os.remove('qn00000.log')
for index in range(1, 10):
    os.remove('qn%05i.traj' % index)
    os.remove('qn%05i.log' % index)
    os.remove('md%05i.traj' % index)
    os.remove('md%05i.log' % index)
Example #2
0
from ase.calculators.lj import LennardJones
#from ase.optimize.basin_mul import BasinHoppingm
from ase.io import read
from ase.units import kB
from ase.calculators.tip4p import TIP4P, epsilon0, sigma0, rOH, angleHOH
from math import cos, sin, pi
from ase.calculators.qmmm import (SimpleQMMM, EIQMMM, LJInteractions,
                                  LJInteractionsGeneral)

from matplotlib import pyplot as plt
from tools.tip4p_cluster import tip4pcluster, tip4pcluster2
from tools.tip4p_cluster import add_tip4p_const

w5 = tip4pcluster2(10, 5).water()

original_positions = 1. * w5.get_positions()
print(original_positions)

hop = MinimaHopping(
    w5,
    Ediff0=0.5,
    #T0=400.,
    mdmin=5,
    minima_traj='w10/lmw10.traj',
    logfile='w10/hop.log')
hop(totalsteps=200)

from ase.optimize.minimahopping import MHPlot

mhplot = MHPlot(logname='w10/hop.log')
mhplot.save_figure('md_w10_200step.png')
Example #3
0
# creates:  hoppingsummary.png
import matplotlib
#matplotlib.use('Agg')
from ase.optimize.minimahopping import MHPlot

execfile('Cu2_Pt110.py')
mhplot = MHPlot()
mhplot.save_figure('hoppingsummary.png')
# Clean up directory.
import os
os.remove('hop.log')
os.remove('minima.traj')
os.remove('qn00000.traj')
os.remove('qn00000.log')
for index in range(1, 10):
    os.remove('qn%05i.traj' % index)
    os.remove('qn%05i.log' % index)
    os.remove('md%05i.traj' % index)
    os.remove('md%05i.log' % index)
Example #4
0
calc = H2S()
from ase.optimize import BFGS, LBFGS
opt = BFGS(w5,
           maxstep=0.02,
           trajectory='w5' + calc.name + '.traj',
           logfile='w5' + calc.name + 'd.log')

opt.run(50000)
opt.run(5000)
opt.run(500)

print('local min finished')

try:
    os.mkdir('h2s5')
except:
    os.rmdir('h2s5')
    os.mkdir('h2s5')
hop = MinimaHopping(
    w5,
    Ediff0=1,
    #T0=400.,
    mdmin=5,
    minima_traj='h2s5/h2s5.traj',
    logfile='h2s5/h2s5.log')
hop(totalsteps=500)

from ase.optimize.minimahopping import MHPlot

mhplot = MHPlot(logname='h2s5/h2s5.log')
mhplot.save_figure('h2s5/h2s5.png')
Example #5
0
from ase.optimize.minimahopping import MHPlot

mhplot = MHPlot()
mhplot.save_figure('summary.png')
Example #6
0
from ase.calculators.lj import LennardJones
#from ase.optimize.basin_mul import BasinHoppingm
from ase.io import read
from ase.units import kB
from ase.calculators.tip4p import TIP4P, epsilon0, sigma0, rOH, angleHOH
from math import cos, sin, pi
from ase.calculators.qmmm import (SimpleQMMM, EIQMMM, LJInteractions,
                                  LJInteractionsGeneral)

from matplotlib import pyplot as plt
from tools.tip4p_cluster import tip4pcluster, tip4pcluster2
from tools.tip4p_cluster import add_tip4p_const
np.random.seed(2015)
w5 = tip4pcluster2(10, 3).water()

original_positions = 1. * w5.get_positions()
print(original_positions)

hop = MinimaHopping(
    w5,
    Ediff0=0.5,
    #T0=400.,
    mdmin=5,
    minima_traj='w10/lmw10_compact.traj',
    logfile='w10/hop_compact.log')
hop(totalsteps=500)

from ase.optimize.minimahopping import MHPlot

mhplot = MHPlot(logname='w10/hop_compact.log')
mhplot.save_figure('md_w10_500step_compact.png')