normal cg_bonds-v5.tcl

  • JBinder
  • JBinder's Avatar Topic Author
  • Offline
  • Fresh Boarder
More
2 years 5 months ago #9218 by JBinder
cg_bonds-v5.tcl was created by JBinder
Hello People

I have a question regarding the cg_bonds-v5.tcl script. I worked through the tutorial and could fixed any problem using this forum but one still remains.

I have a simulation box with multiple proteins in it. When i try to run the script I get the following error.

got another line
gmxdump done
got another line
gmxdump done
key "0" not known in dictionary

Is there anything wrong with the output i generated with martinize2.

Thank you very much for your help

Kind regards
Jonas

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #9484 by buuhuu
Replied by buuhuu on topic cg_bonds-v5.tcl
I know this is an old thread, however someone might have the same issue.

The problem is that the gmx dump output changed between GROMACS versions 5.x and 20XX in a way that the parameter #atoms_mol was removed. This is however quite central in the cg_bonds code. Without it, cg_bonds does not know the number of beads in a molecule, which yields an empty dictionary in which the key "0" is of course not present.

The only workaround (to my knowledge) to visualize your protein is to generate the topology in GROMACS 5.x and use this in VMD with cg_bonds.tcl. Hopefully, cg_bonds gets a rewrite soon.

Best
Eric

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #9495 by riccardo
Replied by riccardo on topic cg_bonds-v5.tcl
See this:
www.cgmartini.nl/index.php/component/kun...ng-cg-bonds-tcl#9494

cg_bonds may not be needed anymore.

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #9525 by morris
Replied by morris on topic cg_bonds-v5.tcl
I was having this exact problem where it was giving me "key "0" not known in dictionary" and just ran it through gmx trajconv. Works perfectly! thanks!

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #9526 by riccardo
Replied by riccardo on topic cg_bonds-v5.tcl
Thanks for posting your fix. Can you just explain what you did more explicitly (i.e.,g what did you use gmx trjconv for) for people that may encounter this same issue? Thank you!

Please Log in or Create an account to join the conversation.

More
1 year 5 months ago #9530 by morris
Replied by morris on topic cg_bonds-v5.tcl
I just copy pasted the commands that you had posted in the thread you linked to, changing the filenames as appropriate.

echo 0 | gmx trjconv -f run.gro -s run.tpr -conect -o run-conect.pdb -pbc whole
sed -i '/ENDMDL/d' run-conect.pdb

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #9558 by AlexBW
Replied by AlexBW on topic cg_bonds-v5.tcl
What cg bonds command did you use after that? I have tried to get it to work with trajconv but I cant seem to do it.

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #9559 by morris
Replied by morris on topic cg_bonds-v5.tcl
You shouldn't have to use any tcl script after that. the output pdb file from this should show up in vmd as connected if you set draw as to lines in the pulldown menu for whatever graphics representation you have selected. here is the contents of the shell script I have most recently used that works.

#!/bin/bash

module load gromacs-2022.3


# this line re-centers the system over the protein. it shouldn't be necessary if you only want to see connected atoms 
echo 6 0 | mpirun -n 1 gmx_mpi trjconv -f step7_production.gro -s step7_production.tpr -o recentered_traj.gro -pbc mol -center 2>error.log


echo 0 | mpirun -n 1 gmx_mpi trjconv -f recentered_traj.gro -s 
step7_production.tpr -conect -o connected_traj.pdb

# this re-centers each frame in the trajectory. It also shouldn't be necessary if you don't want that
echo 6 0 | mpirun -n 1 gmx_mpi trjconv -f step7_production.xtc -s step7_production.tpr -o recentered_traj.xtc -pbc mol -center 2> error.log
sed -i '/ENDMDL/d' connected_traj.pdb


the number that follows echo indicates which group you want to select, with 6 being protein and 0 be the entire system. If you don't pipe echo to gromacs first, you can run this interactively to see all the options when selecting. but you will need to run each line as individual commands. the filenames are the defaults that charmmgui martini maker bilayer input generator makes. change as appropriate.

calling vmd from the terminal should produce a trajectory that shows up with bonded atoms connected and the pbc re-centered over your protein at every frame.

vmd recentered_traj.xtc connected_traj.pdb

I am running this on gromacs-2022.3 installed on CentOS 7, with vmd 1.9.1 for reference.

If it's not working possible problems might be:
  • your .tpr file and your .pdb file don't correspond to the same structure
  • you are using mac OS or BSD and the sed command syntax differs
  • perhaps your input pdb isn't formatted the way gromacs likes?

hope that helps

Please Log in or Create an account to join the conversation.

Time to create page: 0.112 seconds