Force as a Function of Displacement Grep Inquiry NO MATCHES FOUND: [@#]

GROMACS version: 2020.3
GROMACS modification: Yes/No
Here post your question:

Umbrella Sampling Inquiry, to generate an xmGrace graph of force as a function of displacement via the below command:

$ grep -v [@#] pullf.xvg | awk ’{print $2}’ > forces

$ grep -v [@#] pullx.xvg | awk ’{print $2}’ >x

I am receiving problem below:

joelsubach@Joels-MacBook-Pro tutorial3 % grep -v [@#] pullf.xvg | awk ’{print $2}’ > forces
zsh: no matches found: [@#]
joelsubach@Joels-MacBook-Pro tutorial3 % grep -v [@#] pullx.xvg | awk ’{print $2}’ >x
zsh: no matches found: [@#]

This problem may be why my Force vs. Displacement graph via:

xmGrace pull_force_vs_displacement.xvg

is not exhibiting anything unless the xmgrace command is different?

Thanks:)

Hi,
assuming that file1 and file2 have 2 columns, you can extract the second ones of each using something like this

cat file1.xvg file2.xvg | awk ‘{if (substr($1,1,1) != “@” && substr($1,1,1) != “#”) print ($2 " " $4)}’

By defining the desired columns to print, this will allow you to create Force vs. Displacement xvg file.

Best regards
Alessandra

Hello Alessandra and thank you for your kind update and yes files 1 and 2 have 2 columns and I input your suggested command but received a PARSE ERROR (please see below):

joelsubach@Joels-MacBook-Pro tutorial3 % cat file1.xvg file2.xvg | awk ‘{if (substr($1,1,1) != “@” && substr($1,1,1) != “#”) print ($2 " " $4)}’

zsh: parse error near `)’
joelsubach@Joels-MacBook-Pro tutorial3 %

I am not sure if me inputting just this line of code is what you were suggesting?

Below is my LS for reference, any further help towards me viewing this graph would be appreciated, thanks:)

joelsubach@Joels-MacBook-Pro tutorial3 % ls
#density.xvg.1# npt.gro
#em.edr.1# npt.log
#em.log.1# npt.mdp
#em.trr.1# npt.tpr
#pressure.xvg.1# npt.trr
#pull.edr.1# npt_prev.cpt
#pull.log.1# posre_Protein_chain_A.itp
#pull.trr.1# posre_Protein_chain_B.itp
#pull.xtc.1# posre_Protein_chain_C.itp
#pullf.xvg.1# posre_Protein_chain_D.itp
#pullx.xvg.1# posre_Protein_chain_E.itp
#solv.gro.1# potential.xvg
#solv.gro.2# pressure.xvg
#topol.top.1# pull.cpt
#topol.top.2# pull.edr
#topol.top.3# pull.gro
#topol.top.4# pull.log
2BEG_model1_capped.pdb pull.tpr
complex.gro pull.trr
density.xvg pull.xtc
em.edr pull_force_vs_displacement.xvg
em.gro pull_prev.cpt
em.log pullf.xvg
em.tpr pullx.xvg
em.trr solv.gro
index.ndx solv_ions.gro
ions.mdp temperature.xvg
ions.tpr topol.top
md_pull.mdp topol_Protein_chain_A.itp
mdout.mdp topol_Protein_chain_B.itp
minim.mdp topol_Protein_chain_C.itp
newbox.gro topol_Protein_chain_D.itp
npt.cpt topol_Protein_chain_E.itp
npt.edr
joelsubach@Joels-MacBook-Pro tutorial3 %

Try using bash rather than zsh.

Hello and thank you for your kind update and instructions, I switched to bash which solved my previous problem, however, have a new problem when trying to plot the force vs. displacement via xmgrace called:

Warning: locale not supported by Xlib, locale set to C

when trying to xmgrace: pull_force_vs_displacement.xvg from my generated ls, please see below:

Joels-MBP:tutorial3 joelsubach$ grep -v [@#] pullf.xvg | awk ’{print 2}’ > forces Joels-MBP:tutorial3 joelsubach grep -v [@#] pullx.xvg | awk ’{print 2}’ >x Joels-MBP:tutorial3 joelsubach paste x forces > pull_force_vs_displacement.xvg
Joels-MBP:tutorial3 joelsubach$ rm x forces
Joels-MBP:tutorial3 joelsubach$ ls
#density.xvg.1# em.tpr pressure.xvg
#em.edr.1# em.trr pull.cpt
#em.log.1# index.ndx pull.edr
#em.trr.1# ions.mdp pull.gro
#pressure.xvg.1# ions.tpr pull.log
#pull.edr.1# md_pull.mdp pull.tpr
#pull.log.1# mdout.mdp pull.trr
#pull.trr.1# minim.mdp pull.xtc
#pull.xtc.1# newbox.gro pull_force_vs_displacement.xvg
#pullf.xvg.1# npt.cpt pull_prev.cpt
#pullx.xvg.1# npt.edr pullf.xvg
#solv.gro.1# npt.gro pullx.xvg
#solv.gro.2# npt.log solv.gro
#topol.top.1# npt.mdp solv_ions.gro
#topol.top.2# npt.tpr temperature.xvg
#topol.top.3# npt.trr topol.top
#topol.top.4# npt_prev.cpt topol_Protein_chain_A.itp
2BEG_model1_capped.pdb posre_Protein_chain_A.itp topol_Protein_chain_B.itp
complex.gro posre_Protein_chain_B.itp topol_Protein_chain_C.itp
density.xvg posre_Protein_chain_C.itp topol_Protein_chain_D.itp
em.edr posre_Protein_chain_D.itp topol_Protein_chain_E.itp
em.gro posre_Protein_chain_E.itp
em.log potential.xvg
Joels-MBP:tutorial3 joelsubach$ vi pull_force_vs_displacement.xvg
Joels-MBP:tutorial3 joelsubach$ xmgrace pull_force_vs_displacement.xvg
Warning: locale not supported by Xlib, locale set to C
Joels-MBP:tutorial3 joelsubach$

any suggestions would be appreciated, thanks:)

Google has lots of suggestions about that message. None of these are GROMACS issues, so you should probably be looking at other resources to get your terminal environment configured properly.

Hello and ok thank you will do:)

…and from the research online I did the problem is not:

Warning: locale not supported by Xlib, locale set to C

since this is just a warning and the graph does appear it is just an empty graph and is empty as well when i open the textfile below:

pull_force_vs_displacement.xvg

My understanding is that the above pull_force_vs_displacement.xvg should exhibit data and it does not and this is why the xmgrace graph is empty as well.

If the command:
xmgrace pull_force_vs_displacement.xvg

is incorrect (this is what I inferred from the tutorial) or if it is a different gromacs issue feel free to elaborate, if it is not a gromacs issue of course ignore this email, thanks:)