[ase-users] Installing ASE to compute Nudged elastic band using MOPAC ASE_MOPAC_COMMAND
Claudio A. Perottoni
caperott at gmail.com
Mon Mar 19 17:28:35 CET 2018
Dear Levi,
You may try adding to .bashrc (note that I have MOPAC installed at
/opt/mopac)
export PATH=/opt/mopac:$PATH
export MOPAC_LICENSE=/opt/mopac
export MOPAC_COMMAND=MOPAC2016.exe
export ASE_MOPAC_COMMAND="/opt/mopac/MOPAC2016.exe mopac.mop"
alias mopac='/opt/mopac/MOPAC2016.exe'
I hope this helps!
Claudio
On Thu, Mar 15, 2018 at 1:04 PM, Lystrom, Levi via ase-users <
ase-users at listserv.fysik.dtu.dk> wrote:
> Hello,
>
>
> I recently found that ASE is able to perform Nudged elastic band using
> MOPAC to compute the geometries. I would like to use ase for Nudged
> elastic band to find the minimal path between configurational isomers and
> the transition state between them. I tried to optimize my structures using
> MOPAC but I get errors, I will attach the script I used below and the error
> I got. I looked into the ase.calculators.mopac and found that I should
> set the ASE_MOPAC_COMMAND but I do not understand how to set one variable
> to multiple values except appending or perpending. My MOPAC_2016.exe was
> set in my local directories because the admin of the cluster has not
> installed MOPAC.
>
>
> Here is what the ase.calculators.mopac states:
>
> """This module defines an ASE interface to MOPAC.
>
> Set $ASE_MOPAC_COMMAND to something like::
>
> LD_LIBRARY_PATH=/path/to/lib/ \
>
> MOPAC_LICENSE=/path/to/license \
>
> /path/to/MOPAC2012.exe PREFIX.mop 2> /dev/null
>
> """
>
> I have in my ~/.bashrc file the following:
>
> ## Setting Mopca
> export MOPAC_LICENSE=/home/lystrom/opt/mopac/
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/lystrom/opt/mopac; export
> LD_LIBRARY_PATH
> PATH=$PATH:/home/lystrom/opt/mopac; export PATH
> alias mopac='/home/lystrom/opt/mopac/MOPAC2016.exe'
>
>
> Here is the error I get when I try to use MOPAC to optimize my structures:
> [lystrom at cluster3-0 C18H15N1]$ python MOPAC.py
> Traceback (most recent call last):
> File "MOPAC.py", line 44, in <module>
> dyn.run(fmax=0.001)
> File "/home/lystrom/bin/python/ase/ase/optimize/optimize.py", line 174,
> in run
> f = self.atoms.get_forces()
> File "/home/lystrom/bin/python/ase/ase/atoms.py", line 735, in
> get_forces
> forces = self._calc.get_forces(self)
> File "/home/lystrom/bin/python/ase/ase/calculators/calculator.py", line
> 460, in get_forces
> return self.get_property('forces', atoms)
> File "/home/lystrom/bin/python/ase/ase/calculators/calculator.py", line
> 493, in get_property
> self.calculate(atoms, [name], system_changes)
> File "/home/lystrom/bin/python/ase/ase/calculators/calculator.py", line
> 656, in calculate
> .format(self.name, self.directory, errorcode))
> RuntimeError: mopac in . returned an error: 127
> [lystrom at cluster3-0 C18H15N1]$
>
>
> Here is my script:
> from ase import Atoms
> from ase.optimize import BFGS
> from ase.calculators.mopac import MOPAC
> from ase.io import read, write
> import numpy as np
>
> atoms = Atoms('C18H15N1',
> positions=[( 0.15624900, -1.78811500, -0.04509800),
> ( 0.28109400, 0.44850700, -0.92241700),
> (-0.32156400, 1.75582700, -0.87207700),
> (-0.51110200, -0.65785900, -0.46731500),
> ( 1.54480000, -1.90763700, -0.42144500),
> ( 1.61597411, -3.83002555, 1.03226598),
> (-1.90644800, -0.40547500, -0.15348300),
> ( 2.22437426, -3.03683036, -0.00372979),
> (-2.37594600, 0.93996100, -0.15895200),
> ( 2.44339172, -4.68009707, 1.81540021),
> (-2.79358600, -1.45076500, 0.15280900),
> ( 3.62009399, -3.23619310, -0.28886688),
> (-3.73332000, 1.18878400, 0.17319700),
> ( 3.78537184, -4.78372920, 1.56656205),
> (-4.11612500, -1.18307300, 0.46527800),
> ( 4.23097277, -2.46135055, -1.47125690),
> ( 4.37455627, -4.07187920, 0.47950947),
> (-4.58109300, 0.13957700, 0.47946700),
> (-0.24947600, -2.44795800, 0.73202600),
> ( 0.29543500, 2.62677100, -1.16773900),
> ( 0.52835857, -3.99897057, 1.04168525),
> ( 1.16173900, 0.30318400, -1.55971300),
> ( 1.97295568, -5.26254600, 2.62284032),
> ( 2.07846004, -1.03020986, -0.81253135),
> (-2.42821000, -2.48908700, 0.13520000),
> ( 3.57462212, -2.52128715, -2.31417528),
> (-4.10652100, 2.22499800, 0.18181200),
> ( 4.36422602, -1.43621033, -1.19515707),
> ( 4.42683485, -5.43459085, 2.17926994),
> (-4.80603300, -2.00620700, 0.70192900),
> ( 5.17851177, -2.88818979, -1.72596869),
> ( 5.44512012, -4.21957985, 0.27336622),
> (-5.63251000, 0.34153900, 0.73416700),
> (-1.54626800, 2.01782300, -0.49355400)],
> calculator=MOPAC(method='AM1',task='OPT'))
> dyn = BFGS(atoms, 'C18H15N1.traj')
> dyn.run(fmax=0.001)
> print(atoms)
> print(atoms.read(label='C18H15N1'))
>
> write('C18H15N1.xyz', read('C18H15N1.traj'))
>
>
> Any help would be very much appreciate,
>
>
> Levi Lystrom
>
>
>
> Enviado via UCSMail.
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
--
Claudio A. Perottoni
Universidade de Caxias do Sul
Rua Francisco Getulio Vargas, 1130
95070-560 Caxias do Sul - RS - Brazil
http://www.researcherid.com/rid/B-8409-2008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20180319/bd389888/attachment-0001.html>
More information about the ase-users
mailing list