How to transform .pdb file to lammps data file?

Hi, all users:
I create a model by using packmol software, getting a .pdb file, how to transform .pdb file to lammps data file?

the .pdb file format as follows:

HEADER
TITLE Built with Packmol
REMARK Packmol generated pdb file
REMARK Home-Page: http://www.ime.unicamp.br/~martinez/packmol
REMARK
HETATM 1 A 1 346.744 529.082 678.439
HETATM 2 A 2 244.424 450.045 838.933
HETATM 3 A 3 263.521 189.566 624.741
HETATM 4 A 4 606.217 558.554 265.695
HETATM 5 A 5 597.529 800.505 408.442
HETATM 6 A 6 848.756 136.312 918.790
HETATM 7 A 7 245.928 181.638 40.373
HETATM 8 A 8 340.500 998.890 505.237
HETATM 9 A 9 196.142 439.359 407.250
HETATM 10 A 10 759.044 0.006 724.443
HETATM 11 A 11 238.718 726.104 935.660
HETATM 12 A 12 191.414 939.562 648.546
HETATM 13 A 13 691.249 355.036 347.792
HETATM 14 A 14 982.892 774.933 595.328
HETATM 15 A 15 690.730 849.187 955.193
HETATM 16 A 16 708.171 704.868 629.714
HETATM 17 A 17 816.966 847.278 496.041
HETATM 18 A 18 305.091 783.112 683.248
HETATM 19 A 19 722.734 160.127 484.196
HETATM 20 A 20 669.591 352.808 502.329
HETATM 21 A 21 495.744 381.829 843.582
HETATM 22 A 22 51.642 46.575 551.839
HETATM 23 A 23 117.876 747.293 827.602


and the useful information in .pdb file is the last three columns, how can I extract them and make a format in lammps data.file, the atom style is atomic.

the atomic style atomic file format:

LAMMPS data file via write_data, version 12 Apr 2013, timestep = 0

100 atoms
1 atom types

0 1000 xlo xhi
0 1000 ylo yhi
0 1000 zlo zhi

Masses

1 1

Pair Coeffs

1 1 1

Atoms

1 1 0.00782637 131.538 755.605 0 0 0
2 1 458.65 532.767 218.959 0 0 0
3 1 47.0446 678.865 679.296 0 0 0
4 1 934.693 383.502 519.416 0 0 0
5 1 830.965 34.5721 53.4616 0 0 0
6 1 529.7 671.149 7.69819 0 0 0
7 1 383.416 66.8422 417.486 0 0 0
8 1 686.773 588.977 930.436 0 0 0
9 1 846.167 526.929 91.9649 0 0 0
10 1 653.919 415.999 701.191 0 0 0
11 1 910.321 762.198 262.453 0 0 0
12 1 47.4645 736.082 328.234 0 0 0
13 1 632.639 756.41 991.037 0 0 0
14 1 365.339 247.039 982.55 0 0 0
15 1 722.66 753.356 651.519 0 0 0
16 1 72.6859 631.635 884.707 0 0 0
17 1 272.71 436.411 766.495 0 0 0
18 1 477.732 237.774 274.907 0 0 0
19 1 359.265 166.507 486.517 0 0 0
20 1 897.656 909.208 60.5643 0 0 0
21 1 904.653 504.523 516.292 0 0 0
22 1 319.033 986.642 493.977 0 0 0
23 1 266.145 90.7329 947.764 0 0 0


thank you very much!
best wishes
Xuepeng liu

Hi, all users:
I create a model by using packmol software, getting a .pdb file, how to
transform .pdb file to lammps data file?

the .pdb file format as follows:
HEADER
TITLE Built with Packmol
REMARK Packmol generated pdb file
REMARK Home-Page: http://www.ime.unicamp.br/~martinez/packmol
REMARK
HETATM 1 A 1 346.744 529.082 678.439
HETATM 2 A 2 244.424 450.045 838.933
HETATM 3 A 3 263.521 189.566 624.741
HETATM 4 A 4 606.217 558.554 265.695
HETATM 5 A 5 597.529 800.505 408.442
HETATM 6 A 6 848.756 136.312 918.790
HETATM 7 A 7 245.928 181.638 40.373
HETATM 8 A 8 340.500 998.890 505.237
HETATM 9 A 9 196.142 439.359 407.250
HETATM 10 A 10 759.044 0.006 724.443
HETATM 11 A 11 238.718 726.104 935.660
HETATM 12 A 12 191.414 939.562 648.546
HETATM 13 A 13 691.249 355.036 347.792
HETATM 14 A 14 982.892 774.933 595.328
HETATM 15 A 15 690.730 849.187 955.193
HETATM 16 A 16 708.171 704.868 629.714
HETATM 17 A 17 816.966 847.278 496.041
HETATM 18 A 18 305.091 783.112 683.248
HETATM 19 A 19 722.734 160.127 484.196
HETATM 20 A 20 669.591 352.808 502.329
HETATM 21 A 21 495.744 381.829 843.582
HETATM 22 A 22 51.642 46.575 551.839
HETATM 23 A 23 117.876 747.293 827.602
........
........

and the useful information in .pdb file is the last three columns, how can I
extract them and make a format in lammps data.file, the atom style is
atomic.

since you already analyzed the situation *this* far, you should be
able to write a small converter tool yourself, e.g. using python or
perl or awk or (gasp) c++ or fortran.
it is particularly straightforward, since you don't seem to be
requiring any topology information and have only one atom type.

of course, you can also use something more sophisticated like the
topotools plugin in VMD (
https://sites.google.com/site/akohlmey/software/topotools/ )

axel.

There is also the ch2lmp tool in the tools dir, which
can convert PDB into data files. It looks as if you
do not have any molecular topology.

Steve

Thanks all of you to give me so much help!
best wishes
Xuepeng Liu