我想将 pmma85compositedata.initeq 转换为 lammps 可接受的数据文件,但我遇到了这个错误:
import lmpsdata, copy
data=lmpsdata.Lmpsdata('pmma85compositedata.initeq','full')
polymer=lmpsdata.molecules(data,1,19,'atom') #'atom
nanoparticle=lmpsdata.molecules(data,20,20,'atom')
surface=lmpsdata.particlesurface(nanoparticle[0], 1.94, 8,'full')
错误:
polymer=lmpsdata.molecules(data,1,19,'atom') #'atom
File "/home/marham/...../lmpsdata.py", line 1193, in molecules
p=Pool(processors)
File "/usr/lib/python2.7/multiprocessing/__init__.py", line 232, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 159, in __init__
self._repopulate_pool()
File "/usr/lib/python2.7/multiprocessing/pool.py", line 214, in _repopulate_pool
for i in range(self._processes - len(self._pool)):
TypeError: unsupported operand type(s) for -: 'str' and 'int'