Author Topic: charge atom indexation ends on 99999  (Read 74 times)

starmm11

  • Newbie
  • *
  • Posts: 8
charge atom indexation ends on 99999
« on: November 16, 2017, 03:05:09 PM »
Hi,

I want to report the bug. When converting .pdb file to lammps data file using ovito the atom indexation ends up on 99999 number.
The following atoms have the zero index.

Thanks
« Last Edit: November 16, 2017, 05:03:16 PM by starmm11 »

Alexander Stukowski

  • Administrator
  • Full Member
  • *****
  • Posts: 221
Re: charge atom indexation ends on 99999
« Reply #1 on: November 16, 2017, 06:00:26 PM »
Hi,

This sounds as if there is a problem in the PDB file parser in OVITO, which I wrote. I have no personal experience with the PDB format and I simply tried to follow the official format specification:

http://www.wwpdb.org/documentation/file-format-content/format33/sect9.html#ATOM

I was under the impression that atom IDs can only be 5 digits long, meaning that the PDB format can store only up to 99999 atoms. What you write suggests that my assumption was wrong.

Please post your PDB file here. I will try to fix the problem in OVITO.

-Alex

starmm11

  • Newbie
  • *
  • Posts: 8
Re: charge atom indexation ends on 99999
« Reply #2 on: November 17, 2017, 12:00:15 PM »
Here is my compressed .pdb file.

Alexander Stukowski

  • Administrator
  • Full Member
  • *****
  • Posts: 221
Re: charge atom indexation ends on 99999
« Reply #3 on: November 17, 2017, 02:18:03 PM »
Thanks. I checked the PDB file in a text editor: Atom serial number in the second file column run from 1 to 99999. After that, the serial number is replaced by the string '******'. OVITO converted that string to the number 0. That's why particle identifier run only from 0 to 99,999 after file import in OVITO.

I now changed the file parer code and added a special handling of the ***** case. It's be available in the next development version of OVITO.

Can you please say something about the origin of that PDB file? Which code was used to produce it? Source that I find only all say that the legacy PDB format cannot store more than 99,999 atoms and any dataset with more atoms needs to be split into multiple files then.

Alexander Stukowski

  • Administrator
  • Full Member
  • *****
  • Posts: 221
Re: charge atom indexation ends on 99999
« Reply #4 on: November 17, 2017, 02:24:39 PM »
By the way:

You can fix the problem of wrong particle identifiers by assigning new IDs within OVITO: Simply use the Compute Property modifier to set the 'Particle Identifier' property. Enter "ParticleIndex+1" as expression. After that you should be able to export the dataset to a valid LAMMPS data file.

starmm11

  • Newbie
  • *
  • Posts: 8
Re: charge atom indexation ends on 99999
« Reply #5 on: November 20, 2017, 10:24:03 AM »
I used Packmol code for generating that .pdb file.

Thanks for the solution of my problem that used only Ovito's functions, I had to write short script for it before.