MaginnGroup / PyLAT

GNU General Public License v3.0
102 stars 54 forks source link

Format of trajectory #11

Open J-You opened 3 years ago

J-You commented 3 years ago

Thanks for your selflessly publish this code.

I have got a problem: """ beginning COM calculation Traceback (most recent call last): File "PyLAT.py", line 254, in (comx, comy, comz, Lx, Ly, Lz, Lx2, Ly2, Lz2) = c.calcCOM(trjfilename,datfilename, ver) File "/home/why/PyLAT-master/src/calcCOM.py", line 47, in calcCOM (xcol, ycol, zcol, molcol, typecol) = self.getcolumns(trjfilename[0]) File "/home/why/PyLAT-master/src/calcCOM.py", line 122, in getcolumns molcol = inline.index('mol') ValueError: 'mol' is not in list """

It is caused by the different format of my dump file, which is "ITEM: ATOMS id type x y z vx vy vz " I'm not sure the dump format identified by PYLAT. It seems not exist in "example" distribution. I also have a problem of what is the difference between 'mol' and 'type', in calcCOM.py, line 122, 123. In fact, my system don't have molecules. It is all consisted by atoms. In my view, both of 'mol' and 'type' signify atom type in data file.

Thanks for your time and attention.

mike5603 commented 3 years ago

Unfortunately, as of right now PyLAT assumes you have molecules in the system. The purpose of mol is to inform the code which atoms belong to the same molecule. For your system, it is mol and id which would be the same. Type gives information on what element your atom is, not which molecule it is a part of.

As of right now there is no plan to incorporate atomistic calculations into the code due to lack of funding and people working on the code. I did write a quick hotfix for another person if you look into the closed issues section of this page titled focus on molecular systems. If you apply that fix you should be able to calculate the properties for atomistic systems

J-You commented 3 years ago

Thanks for your reply. I will try to fix the code for my simulation.