hmcezar / clusttraj

Python script that receives a molecular dynamics or Monte Carlo trajectory and performs agglomerative clustering to classify similar structures.
https://hmcezar.github.io/clusttraj/
GNU General Public License v3.0
18 stars 3 forks source link

Invalid literal related with atom symbol #4

Open alexispaz opened 1 year ago

alexispaz commented 1 year ago

Running with:

python clusttraj.py output.xyz 0.5 -e -cc xyz -p

I get the following error

  ...
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 375, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 774, in get
    raise self._value
ValueError: invalid literal for int() with base 10: 'Sn'

output.xyz have Sn atoms...

hmcezar commented 1 year ago

The problem does not seem to be with the fact it's an Sn atom, but with something else. Could you provide more details or, even better, your output.xyz?

alexispaz commented 1 year ago

Sure. I actually cropped the trajectory to a minimum of 2 frames, and still get the error. I can paste it here:

11

 Sn       18.466881        1.744415       -1.052984
 Sn       19.255112       -2.084599       -0.118589
 Sn       23.170916        2.192084        0.441454
 Sn       20.360153       -1.410793        2.275221
 Sn       22.150932       -1.651695       -2.732311
 Sn       22.878597       -0.249520        2.246573
 Si       20.579840        2.905550        0.485799
 Si       20.493309        0.638221        0.050026
 Si       21.150881        2.312723       -1.650138
 Si       23.089417        0.204668       -1.274464
 Si       20.514685        0.109347       -2.088160
11

 Sn       18.252872        1.951786       -1.192248
 Sn       18.587017       -1.770223       -0.427785
 Sn       23.136635        2.465702        0.425529
 Sn       20.661432       -1.720543        2.063437
 Sn       22.527288       -1.924701       -2.216776
 Sn       23.138144       -0.194802        1.753556
 Si       20.172422        2.841976        0.672572
 Si       20.189831        0.619951        0.748034
 Si       21.082079        1.851795       -1.255157
 Si       22.552580       -0.086671       -0.485591
 Si       20.531490       -0.186288       -1.394425