```trjconv``` -s is not optional as stated in the documentation and -s other than ```tpr``` does not produce CONECT records
Summary
I couldn't find any documentation of this issue but also get this in the output of trjconv
: Note that major changes are planned in future for trjconv, to improve usability and utility.
So, let me know if this is not worth fixing depending on the tool's future.
This is sort of a two-in-one issue. I want to generate CONECT records for a given pdb file. Based on the documentation, I should be able to do this because the -s
option is labeled as optional. However, I get an output error saying a topology is necessary. If I try to use the pdb file as the input for -s
, which the documentation says is ok, I get no error but CONECT records do not appear in the output pdb. The solution is to generate a tpr file for my pdb which takes multiple extraneous commands (pdb2gmx, editconf, grompp, then trjconv).
In editconf, it is noted that CONECT records require a topology file but not in trjconv (and an error is thrown if you try to use -f input.pdb, but it is a null pointer error). So I assume what I'm trying to do is not possible without generating a tpr for input but the documentation would lead a user to assume otherwise.
GROMACS version
gmx -quiet --version
:-) GROMACS - gmx, 2024.1 (-:
Executable: /usr/local/gromacs/bin/gmx
Data prefix: /usr/local/gromacs
Working dir: /home/bandrews/projects/DROP/examples/setDihedralList/Polyarginine
Command line:
gmx -quiet --version
GROMACS version: 2024.1
Precision: mixed
Memory model: 64 bit
MPI library: thread_mpi
OpenMP support: enabled (GMX_OPENMP_MAX_THREADS = 128)
GPU support: disabled
SIMD instructions: AVX2_256
CPU FFT library: fftw-3.3.8-sse2-avx-avx2-avx2_128
GPU FFT library: none
Multi-GPU FFT: none
RDTSCP usage: enabled
TNG support: enabled
Hwloc support: disabled
Tracing support: disabled
C compiler: /usr/bin/cc GNU 11.4.0
C compiler flags: -fexcess-precision=fast -funroll-all-loops -mavx2 -mfma -Wno-missing-field-initializers -O3 -DNDEBUG
C++ compiler: /usr/bin/c++ GNU 11.4.0
C++ compiler flags: -fexcess-precision=fast -funroll-all-loops -mavx2 -mfma -Wno-missing-field-initializers -Wno-cast-function-type-strict -fopenmp -O3 -DNDEBUG
BLAS library: Internal
LAPACK library: Internal
Steps to reproduce
gmx trjconv -f input.pdb -o input-conect.pdb -conect yes
I attached input.pdb but this should happen with any input structure file.
What is the current bug behavior?
Output without -s
:
:-) GROMACS - gmx trjconv, 2024.1 (-:
Executable: /usr/local/gromacs/bin/gmx
Data prefix: /usr/local/gromacs
Working dir: /home/bandrews/projects/DROP/examples/setDihedralList/Polyarginine
Command line:
gmx trjconv -f input.pdb -o input-conect.pdb -conect yes
Note that major changes are planned in future for trjconv, to improve usability and utility.
Will write pdb: Protein data bank file
-------------------------------------------------------
Program: gmx trjconv, version 2024.1
Source file: src/gromacs/utility/futil.cpp (line 454)
File input/output error:
topol.tpr
For more information and tips for troubleshooting, please check the GROMACS
website at https://manual.gromacs.org/current/user-guide/run-time-errors.html
Documentation says I can use pdb for -s
so I try to do that: gmx trjconv -f input.pdb -s input.pdb -o input-conect.pdb -conect yes
. I get no error, but the output pdb (input-conect.pdb) has no CONECT records in it.
What did you expect the correct behavior to be?
Based on the documentation, I expect to get a pdb file with CONECT records without the -s
option specified. Ex: gmx trjconv -f input.pdb -o input-conect.pdb -conect yes
. If that cannot happen, the documentation should change to reflect that. Using alternatives to tpr files for -s
should lead to valid output if the option is required or not or an error/warning should appear.
There is no crash report or log to provide for this specific bug.
Possible fixes
The easier fix is just changing the docs to specify -s is not optional for trjconv and that -conect yes requires topology file as in editconf. But, there should probably be an error/warning if -conect yes
is specified but it cannot be produced (i.e.-s
is not a tpr) printed when someone uses this command. However, it would be useful to be able to generate CONECT records in pdbs without extra steps for the user. This should be possible but not sure if the value of having it would be worth the effort.