Lammps Version: 29 August 2024, System OS: Ubuntu 22.04 LTS.
I dumped xtc trajectory files in a lammps simulation which I want to rerun using lammps.
The dump command was as follows:
dump TRAJ all xtc ${samplefreq} charge1.xtc
dump_modify TRAJ precision 1000000
And the rerun command looks like this:
rerun ../charge1.xtc dump x y z format molfile xtc
However, upon running the rerun script, I get the following error:
ERROR: Unrecognized reader style 'molfile' is part of the MOLFILE package which is not enabled in this LAMMPS binary. (src/read_dump.cpp:236)
Last command: rerun ../charge1.xtc dump x y z format molfile xtc
This tells me that my lammps binary was not built with MOLFILE package. Hence I rebuilt it to include MOLFILE package using the following sequence of commands:
I did not do make install as I do not want to overwrite the existing lammps shared libraries. So I use the whole path of this binary while running the rerun script.
Even after building the new lammps binary with MOLFILE package, the same error occurs. I tried to check the installed packages in this new binary using the lmp -h command, but it does not show MOLFILE as one of the installed packages.
I have also put the gromacsplugin.so file in the directory where I am running the rerun script. But the same error persists. Can someone help me with this? I am unable to figure out what I am missing here.
The output of the lmp-h command is big and hence I am providing it in files as an attachment.
Sorry I am attaching files in a new comment as there was some error in uploading the files.
This is the output for the first lammps used for running the simulations lmp_help_1.txt (12.3 KB)
and this is the output for the newly build lammps with MOLFILE package. lmp_help_2.txt (12.3 KB)
You are right. But I did upload two different files, one with suffix “1” and another with “2”. But the second file is getting renamed as the first one, even after multiple tries.
However, the output from lmp -h command for both the lammps is indeed exactly the same. So, I think it does not matter.
You are correct in pointing out that the lmp_help_2.txt does not contain MOLFILE package in the installed package list. But that is the issue I am facing as I have mentioned in my original post. That is why I am seeking help.
Both executables use the same shared library path. This is probably because you have set the LD_LIBRARY_PATH environment variable. The lmp executable does not much but load the LAMMPS library and then use its content. You can avoid such problems by setting -D BUILD_SHARED_LIBS=off.
The files attached were two different files but while uploading the second file always gets renamed/changed to the file lmp_help_1.txt. I am not sure why this is happening.
However, the output for lmp -h command for both lammps is the exactly the same.
I did turn the option to build shared libraries because sometimes I use lammps as a library with a fortran code. Will turning off that flag sort the issue?
I have new nothing to add to my previous response. You should know from previous exchanges how much I dislike it when people don’t read my responses carefully and ask questions that I have already answered.
You don’t have to do this for both executables. Please read up on shared libraries and understand what happens here. Also, you can link Fortran code to the static library as well. You need a shared library only for the Python module.