MaginnGroup / PyLAT

GNU General Public License v3.0
100 stars 53 forks source link

Issues regarding RDF calculation #22

Open surya25m opened 2 years ago

surya25m commented 2 years ago

Hi, Here, I am calculating RDF using the following command in PyLAT code.

python ~/software/PyLAT/PyLAT.py -g --mol PM --mol Cl --nummol 9 --nummol 9 -f 9_rdf.json -v 2 log.lammps pm.data ful l.lammpstraj

I got the following error,

beginning COM calculation Traceback (most recent call last): File "/home/Surya/software/PyLAT/PyLAT.py", line 254, in (comx, comy, comz, Lx, Ly, Lz, Lx2, Ly2, Lz2) = c.calcCOM(trjfilename,datfilename, ver) File "/home/Surya/software/PyLAT/src/calcCOM.py", line 44, in calcCOM (num_lines, n, num_timesteps, count, line)=self.getnum(trjfilename) File "/home/Surya/software/PyLAT/src/calcCOM.py", line 68, in getnum n = int(trjfile.readline()) ValueError: invalid literal for int() with base 10: '8 6.09304 6.99314 5.74305\n'

where, my dump file formate is " ATOMS ID type x y z" Please, help me where I have done mistakes.

Thanks for your time and attention...

mike5603 commented 2 years ago

The RDF calculates a center of mass RDF, so it needs to know the molecule each atom belongs to, so that should be included in the dump file as well. Let me know if that changes things.

surya25m commented 2 years ago

Thanks for your suggestion, I have changed the dump file by giving the individual atoms (e.g, C, N, H) instead of atoms id type, now it's showing the following error.

============ Traceback (most recent call last): File "/home/Surya/software/PyLAT/PyLAT.py", line 249, in (V, Lx, Ly, Lz) = gcn.getvolume(trjfilename[0]) File "/home/Surya/software/PyLAT/src/getCoordinationNumber.py", line 114, in getvolume Lx = float(xbounds[1])-float(xbounds[0]) ValueError: could not convert string to float: 'C'

Please suggest the appropriate dump file format for running this code, in getCoordinationNumber.py you are omitting the first five lines but in the case of the calcCOM.py file you are omitting 3 lines. So, my concern is which should be the appropriate dump file format for maintaining these observations.

Please Advise Thank You...

mike5603 commented 2 years ago

If you look in the examples section, you will be able to see the output the PyLAT expects