[ase-users] Using lammps to calculate (ZnO)1 nanocluster
Dong gi Kang
kdg4206 at gmail.com
Wed Dec 16 15:43:40 CET 2020
Hello,
I have attempted to calculate a single formula unit of (ZnO)1 nanocluster using lammps/ase with the script [1]
However, the calculation is aborted with an error [2].
Could you please give any advice on this?
Is this correct script to read tabulated potential?
[1]
from ase import Atom, Atoms
from ase.build import bulk
from ase.calculators.lammpslib import LAMMPSlib
cmd = ["pair_style hybrid/overlay coul/msm 12.0 table spline 20001",
"kspace_style msm 1.0e-4",
"pair_coeff * * coul/msm",
"pair_coeff 1 1 table ./lammps_whitmore_ip Zn_Zn",
"pair_coeff 1 2 table ./lammps_whitmore_ip O_Zn",
"pair_coeff 2 2 table ./lammps_whitmore_ip O_O"]
ZnO = Atoms('ZnO', positions=[(-0.32958489, 0.0, 0.0), (1.3470843, 0.0, 0.0)])
ZnO[0].charge=2
ZnO[1].charge=-2
charge = ZnO.get_initial_charges()
lammps = LAMMPSlib(lmpcmds=cmd, log_file='log.lammps')
ZnO.calc = lammps
print("Energy ", ZnO.get_potential_energy())
[2]
LAMMPS (3 Mar 2020)
units metal
atom_style atomic
atom_modify map array sort 0 0
boundary s s s
box tilt large
region cell prism 0 1.7605026495 0 0.0 0 0.0 0.0 0.0 0.0 units box
ERROR: Illegal region prism command (../region_prism.cpp:86)
Last command: region cell prism 0 1.7605026495 0 0.0 0 0.0 0.0 0.0 0.0 units box
[3] in general I use this command on lammps
# ZnO BCT phase simulation
units metal
atom_style charge
dimension 3
boundary f f f
###########################
# read in structure coord #
###########################
read_data ./geometry
#########################
# read in force field #
#########################
pair_style hybrid/overlay coul/msm 12.0 table spline 20001
kspace_style msm 1.0e-4
pair_coeff * * coul/msm
pair_coeff 1 1 table ./lammps_whitmore_ip Zn_Zn
pair_coeff 1 2 table ./lammps_whitmore_ip O_Zn
pair_coeff 2 2 table ./lammps_whitmore_ip O_O
I appreciate your time.
Kind regards,
DG Kang.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20201216/cc26e87e/attachment.htm>
More information about the ase-users
mailing list