LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] PyLammps breakdown when using atoms list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] PyLammps breakdown when using atoms list


From: Xiuyang Xia <xiuyang.xia@...24...>
Date: Sat, 11 Nov 2017 16:58:07 +0800

The LAMMPS version is updated (23 Oct 2017), but the same problem appeared again. The “atoms” list seems like make IPython (jupyter notebook) breakdown.
Details are listed below.

Title: Untitled
In [2]:
from lammps import IPyLammps
In [3]:
melt=IPyLammps()
LAMMPS output is captured by PyLammps wrapper
In [4]:
melt.units('lj')
melt.atom_style('atomic')
In [5]:
melt.lattice('fcc',0.8442)
Out[5]:
'Lattice spacing in x,y,z = 1.6796 1.6796 1.6796'
In [6]:
melt.region('box block',0,10,0,10,0,10)
melt.create_box(1,'box')
melt.create_atoms(1,'box')
melt.mass(1,1.0)
In [7]:
melt.velocity('all create',3.0,87287)
In [8]:
melt.pair_style('lj/cut',2.5)
melt.pair_coeff(1,1,1.0,1.0,2.5)
In [10]:
melt.neighbor(0.3,'bin')
melt.neigh_modify('every',20,'delay',0,'check no')
In [11]:
melt.fix(1,'all nve')
In [12]:
melt.thermo(50)
In [13]:
melt.run(250)
Out[13]:
['Neighbor list info ...',
 '  update every 20 steps, delay 0 steps, check no',
 '  max neighbors/atom: 2000, page size: 100000',
 '  master list distance cutoff = 2.8',
 '  ghost atom cutoff = 2.8',
 '  binsize = 1.4, bins = 12 12 12',
 '  1 neighbor lists, perpetual/occasional/extra = 1 0 0',
 '  (1) pair lj/cut, perpetual',
 '      attributes: half, newton on',
 '      pair build: half/bin/atomonly/newton',
 '      stencil: half/bin/3d/newton',
 '      bin: standard',
 'Setting up Verlet run ...',
 '  Unit style    : lj',
 '  Current step  : 0',
 '  Time step     : 0.005',
 'Per MPI rank memory allocation (min/avg/max) = 3.221 | 3.221 | 3.221 Mbytes',
 'Step Temp E_pair E_mol TotEng Press ',
 '       0            3   -6.7733681            0   -2.2744931   -3.7033504 ',
 '      50    1.6758903   -4.7955425            0   -2.2823355     5.670064 ',
 '     100    1.6458363   -4.7492704            0   -2.2811332    5.8691042 ',
 '     150    1.6324555   -4.7286791            0    -2.280608    5.9589514 ',
 '     200    1.6630725   -4.7750988            0   -2.2811136    5.7364886 ',
 '     250    1.6275257   -4.7224992            0    -2.281821    5.9567365 ',
 'Loop time of 0.865573 on 1 procs for 250 steps with 4000 atoms',
 '',
 'Performance: 124772.849 tau/day, 288.826 timesteps/s',
 '91.2% CPU use with 1 MPI tasks x no OpenMP threads',
 '',
 'MPI task timing breakdown:',
 'Section |  min time  |  avg time  |  max time  |%varavg| %total',
 '---------------------------------------------------------------',
 'Pair    | 0.7276     | 0.7276     | 0.7276     |   0.0 | 84.06',
 'Neigh   | 0.10373    | 0.10373    | 0.10373    |   0.0 | 11.98',
 'Comm    | 0.015255   | 0.015255   | 0.015255   |   0.0 |  1.76',
 'Output  | 0.00018096 | 0.00018096 | 0.00018096 |   0.0 |  0.02',
 'Modify  | 0.014646   | 0.014646   | 0.014646   |   0.0 |  1.69',
 'Other   |            | 0.004169   |            |       |  0.48',
 '',
 'Nlocal:    4000 ave 4000 max 4000 min',
 'Histogram: 1 0 0 0 0 0 0 0 0 0',
 'Nghost:    5499 ave 5499 max 5499 min',
 'Histogram: 1 0 0 0 0 0 0 0 0 0',
 'Neighs:    151513 ave 151513 max 151513 min',
 'Histogram: 1 0 0 0 0 0 0 0 0 0',
 '',
 'Total # of neighbors = 151513',
 'Ave neighs/atom = 37.8783',
 'Neighbor list builds = 12',
 'Dangerous builds not checked']
In [14]:
melt.system
Out[14]:
System(units='lj', atom_style='atomic', atom_map='none', natoms=4000, ntypes=1, style='lj/cut', kspace_style='none', dimensions=3, orthogonal_box=[16.796, 16.796, 16.796], boundaries='p,p p,p p,p', xlo=0.0, xhi=16.796, ylo=0.0, yhi=16.796, zlo=0.0, zhi=16.796)
In [17]:
melt.fixes
Out[17]:
[{'group': 'all', 'name': '1', 'style': 'nve'}]
In [27]:
melt.runs[0]
Out[27]:
Run(thermo=ThermoData(Step=[0.0, 50.0, 100.0, 150.0, 200.0, 250.0], Temp=[3.0, 1.6758903, 1.6458363, 1.6324555, 1.6630725, 1.6275257], E_pair=[-6.7733681, -4.7955425, -4.7492704, -4.7286791, -4.7750988, -4.7224992], E_mol=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], TotEng=[-2.2744931, -2.2823355, -2.2811332, -2.280608, -2.2811136, -2.281821], Press=[-3.7033504, 5.670064, 5.8691042, 5.9589514, 5.7364886, 5.9567365]))
In [29]:
melt.atoms
Out[29]:
<lammps.AtomList at 0x10a726e10>
In [ ]:
melt.atoms[0].position
In [ ]:
 


在 2017年11月10日,上午11:35,Axel Kohlmeyer <akohlmey@...24...> 写道:



On Thu, Nov 9, 2017 at 8:55 PM, Xiuyang Xia <xiuyang.xia@...24...> wrote:
LAMMPS (11 Aug 2017)

I use PyLammps in iPython (jupyter notebook) in my Mac. The input is based on .in file in /examples/melt and translate it to PyLammps format according to manual. But when I input “L.atoms[0].position”, the iPython breakdown immediately. Different lists or objects, such on runs, system, fixes, computes, don’t occur the problem.

​please update LAMMPS to the latest version (23 Oct 2017 currently) and try again.

axel.​

 

<Pasted Graphic.tiff>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...396...sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...36.....24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.