PDB file couldn't be written with unwrapped lammps trajectory

Dear All,
I am working with lammps 10Mar2021 version with Mpipi model to run a biomolecular condensate of 100 chains. After, running the simulation I dumped the wrapped and unwrapped trajectory using the dump command. But, peculiarly I see that some residues have the x coordinates in value of 4 digits, which looks weird and when I converted the trajectory into dcd format and passed the pdb file to obtain the final snapshot of the system in pdb format using vmd the pdb is not getting written. This must be due to the 4-digit number in the x coordinates.
Could anyone let me know why this type of issue occurs and any way to sort this out?
When I tried with the wrapped coordinates there is no error and the pdb file gets written perfectly.

part of file

2137 16 18 0.0 1115.9058690906 -442.7275446832 100.6231213924
2124 16 14 0.0 1108.4697904155 -460.6234381442 100.6620067703
2125 16 6 0.0 1109.5498815664 -456.8847241524 101.0850927796
2128 16 4 -0.75 1117.7703440755 -455.8799528596 98.1713273219
8038 58 9 0.75 -287.921028063 -103.2212391308 105.1199040418
2129 16 1 0.0 1118.093764336 -452.2286864941 97.0931899023
2138 16 10 0.0 1115.1646463302 -446.254936927 102.236175951
2130 16 1 0.0 1115.6430473649 -450.1513140964 95.3022154479
2131 16 6 0.0 1115.6101800126 -447.782213338 92.1025783537
2133 16 17 0.0 1120.1244086194 -443.4606956256 92.9503079921
2132 16 9 0.75 1118.4525568235 -445.7651754119 90.634352659
8041 58 4 -0.75 -287.0915662804 -108.8723327169 101.7273552482
6986 50 4 -0.75 238.9234245713 -102.1757329744 90.0824043784
2127 16 1 0.0 1114.523799554 -456.1219706903 99.7979065761
2126 16 18 0.0 1112.2684258401 -455.0808073072 102.4482179602
2141 16 6 0.0 1123.394952615 -445.6181678246 107.4938709655
4137 30 18 0.0 -110.8339918093 79.7965682153 92.6816913311
4138 30 1 0.0 -113.5825656304 79.9787230255 89.9259488603
3359 24 4 -0.75 773.7939117418 -456.9780528772 94.1063499002
2119 16 1 0.0 1107.0344689174 -454.9312273537 97.3973601522
4134 30 18 0.0 -113.4848800928 83.9185637994 100.5906991499
2118 16 1 0.0 1108.563247193 -453.490491955 94.1899129618

PDB is a very “fussy” file format. Most analysis or visualisation packages will read in a wrapped trajectory and can then “unwrap” it in memory for analysis, so you can analyse the unwrapped trajectory without having to write or read a file for it.

Dear Tee,
Thank you for your reply. I am in need of the final snapshot of the file to be converted into an all-atom model using PULCHARA to perform MD simulations with that All Atom structure.

Using PDB format files to exchange data between software is a very, VERY bad idea. If the developers of the software that you are trying to use do not support other file formats than PDB, then this is a big problem and will seriously limit the usefulness of that software.

The PDB format allocates space for storing 6 digits per coordinate. Since it was originally intended to share X-Ray data, which is of rather low resolution, there was not much of a problem. However, the proliferation of PDB as a common denominator file format in the MD simulation software ecosystem has become a big problem since many applications now suffer from the limitations of the format.
The format is based on Fortran fixed format output (Protein Data Bank (file format) - Wikipedia) which may not overflow and thus it is quite tricky to write and parse correctly it has been deprecated by the Protein Data Bank maintainers many years ago in favor of the PDBx or mmCIF format.

In other words, it is easy to overflow the coordinate output with unwrapped position data or even wrapped position data for large system. But the limitation is not in LAMMPS, it is a limitation of the file format and a more suitable file format should be used.

Thank Axel. You are correct. The program takes only PDB files for input. I will look out for other software that is compatible with file formats other than PDB.

If you have the source code of the package in question, it should not be too difficult to change the part of the code that is reading the PDB file to read a LAMMPS dump file instead. If set up correctly as a custom dump, you can output the same information (and then some) with much higher precision.

pulchra304.tgz (7.1 MB)

Dear Axel, I have attached the source code for the PULCHARA that I used to convert the CG system into all atom system. Please find the attached file.

Two things:

  1. Watch your spelling. You’ve been obviously misspelling the name of the application all the time. It helps to know Latin, though (Pulchra = beautiful).

  2. Why post it here (does its license even allow unchecked redistribution?)?
    But more importantly, I don’t care (and probably 99% of the people following the forum, too)
    and I am most certainly not interested to do your work for you.
    As a computational scientist it should not be that much of a challenge to modify a non-parallel
    program in some peripheral part (file parsing is typically rather easy to understand and modify and
    not related to algorithmic details).

Dear Axel,
Thank you for pointing this out. I didn’t mean to do the work for me. I am just posting to know that this is the software that I use for converting the CG to All atom system. Sorry for the typo error. Pulchra is free software available to all users.