I am trying to use the tool included with Lammps named dump2pdb.py tool. I want to convert a Lammps dump file to pdb format. So I run in linux terminal this command:
python dump2pdb.py dump.peri 1 2 3 4 5 (dump.peri is the file that I want to convert)
It gives me this error:
Traceback (most recent call last):
File "dump2pdb.py", line 21, in <module>
raise StandardError, "Syntax: dump2pdb.py dumpfile Nid Ntype Nx Ny Nz pdbfile template"
StandardError: Syntax: dump2pdb.py dumpfile Nid Ntype Nx Ny Nz pdbfile template
What did I do wrong? I'm sure that both the dump2pdb.py file and the dump.peri file are at the current directory, and I already set up the environment variable correctly before running the command.
I am trying to use the tool included with Lammps named dump2pdb.py tool.
I want to convert a Lammps dump file to pdb format. So I run in linux
terminal this command:
python dump2pdb.py dump.peri 1 2 3 4 5 (dump.peri is the file that I
want to convert)
It gives me this error:
Traceback (most recent call last):
File "dump2pdb.py", line 21, in <module>
raise StandardError, "Syntax: dump2pdb.py dumpfile Nid Ntype Nx Ny
Nz pdbfile template"
StandardError: Syntax: dump2pdb.py dumpfile Nid Ntype Nx Ny Nz pdbfile
template
What did I do wrong? I'm sure that both the dump2pdb.py file and the
the error message _tells_ you what is wrong.
all you have to do is to _read_.
where are "pdbfile" and "template" ?
Oh I copied the command syntax on Lammps forum without looking at the syntax instruction inside the dump2pdb.py file itself. Thank you again for explaining!
I don't know if this is worth mentioning or not. I found something strange when using this dump2pdb.py tool:
This tool uses the environment variable LAMMPS_PYTHON_TOOLS. And if I set the variable to ~/lammps/tools/python/pizza, the outcome is different than if I set it to ~/pizza/src (the src folder in the pizza.py toolkit). Namely, in the first case it writes out the coordinates of all atoms the same. While there's no such problem in the second case.
The corresponding files in those 2 folders are supposed to work the same, but it seems they don't. Can you confirm this? I downloaded the newest versions of Lammps and pizza tool kit by the way.
I include here the input file dump.1000.peri that I want to convert to pdb format, together with the converted pdb files.
1) I put in these commands:
export export LAMMPS_PYTHON_TOOLS=/home/quang/Desktop/lammps/tools/python/pizza
python dump2pdb.py dump.1000.peri 1 2 3 4 5 dump.1000.peri.1
The file dump.1000.peri.1.pdb is generated.
2) Then I put in these commands:
export LAMMPS_PYTHON_TOOLS=/home/quang/Desktop/pizza/src
python dump2pdb.py dump.1000.peri 1 2 3 4 5 dump.1000.peri.2
Similarly, the dump.1000.peri.2.pdb is generated.
The second pdb file has all the coordinates right, when the first one not. I'm not really sure why. The Lammps source files version is 27Oct11, the pizza toolkit version is 7Oct11.