Single point energy of all the frames of protein only from the complex trajectory

GROMACS version:
GROMACS modification: Yes/No
Here post your question for my earier querry " Extraction of single point energy for each frame of the trajecotory" the suggestion given by ebriand was able to extract the single point energy of the whole system for each frame. now my question is "Is this possible to extract the single point energy of protein only for all the frames using the trajectory of a complex system(protein, water, ions)? " if yes then how? and my next question is does the difference of whole system energy with the protein energy will give me right estimation of solvent reorganization energy?.

Enthalpy (potential energy) alone is useless in nearly all cases, as that does not include the entropy. The free-energy is what is relevant, but that can not easily be decomposed in group contributions.

Then there are also practical issues for computing group energies, as the long-range electrostatic part can not be decomposed.

thank you for the reply. i agress with what you mentioned “these gruop wise single point energy decompostion of protein, water and ions is not useful directly.” but i just want to know is there any way in gromacs by which i can extract single point energy of protein only from the trajectory of protein, solvent and ions system.

You can create a tpr for the protein only. You can then use mdrun -rerun with a trajectory file with only the protein in it (which you can extract with gmx trjconv).

#index
gmx_mpi -quiet make_ndx -f md_confout.gro -o system.ndx 0
gmx_mpi -quiet make_ndx -f md_confout.gro -o protein.ndx
selected 1 (protein)

#tpr
gmx_mpi -quiet grompp -f ie.mdp -c md_confout.gro -n protein.ndx -p md_processed.top -t md_state.cpt -po protein_ie_mdout.mdp -pp protein_ie_processed.top -o protein_ie.tpr -maxwarn 3

#xtc
gmx trjconv -f md_traj_comp.xtc -s protein_ie.tpr -o protein.xtc
Group 0 ( System) has 77667 elements
1 ( Protein) has 9573 elements
selected 1

#run spe
gmx_mpi -quiet mdrun -s protein_ie.tpr -mp protein_ie_processed.top -mn protein.ndx -rerun protein.xtc -o protein_ie_traj.trr -x protein_ie_traj_comp.xtc -cpo protein_ie_state.cpt -c protein_ie_confout.gro -e protein_ie_ener.edr -g protein_ie_md.log -xvg xmgrace -nb gpu

error:
Number of atoms in trajectory (9573) does not match the run input file (77667)

ie.mdp
title = Protein-ligand complex MD simulation
; Run parameters
integrator = md ; leap-frog integrator
nsteps = 5000000 ; 2 * 5000000 = 10000 ps (10 ns)
dt = 0.002 ; 2 fs
; Output control
nstenergy = 1 ; save energies every 10.0 ps
nstlog = 5000 ; update log file every 10.0 ps
nstxout-compressed = 5000 ; save coordinates every 10.0 ps
; Bond parameters
continuation = yes ; continuing from NPT
constraint_algorithm = lincs ; holonomic constraints
constraints = h-bonds ; bonds to H are constrained
lincs_iter = 1 ; accuracy of LINCS
lincs_order = 4 ; also related to accuracy
; Neighbor searching and vdW
cutoff-scheme = Verlet
ns_type = grid ; search neighboring grid cells
nstlist = 20 ; largely irrelevant with Verlet
rlist = 1.2
vdwtype = cutoff
vdw-modifier = force-switch
rvdw-switch = 1.0
rvdw = 1.2 ; short-range van der Waals cutoff (in nm)
; Electrostatics
coulombtype = PME ; Particle Mesh Ewald for long-range electrostatics
rcoulomb = 1.2
pme_order = 4 ; cubic interpolation
fourierspacing = 0.16 ; grid spacing for FFT
; Temperature coupling
tcoupl = V-rescale ; modified Berendsen thermostat
tc-grps = Protein Non-Protein ; two coupling groups - more accurate
tau_t = 0.1 0.1 ; time constant, in ps
ref_t = 300 300 ; reference temperature, one for each group, in K
; Pressure coupling
pcoupl = c-rescale ; pressure coupling is on for NPT
pcoupltype = isotropic ; uniform scaling of box vectors
tau_p = 2.0 ; time constant, in ps
ref_p = 1.0 ; reference pressure, in bar
compressibility = 4.5e-5 ; isothermal compressibility of water, bar^-1
; Periodic boundary conditions
pbc = xyz ; 3-D PBC
; Dispersion correction is not used for proteins with the C36 additive FF
DispCorr = no
; Velocity generation
gen_vel = no ; continuing from NPT equilibration

where is the error? in tpr file how to know how many atoms/ group are there and in xtc file?

It looks like you used a tpr file for the whole system and not for the protein only.

using the index file of protein i am generating the tpr for protein.
gmx_mpi -quiet grompp -f ie.mdp -c md_confout.gro -n protein.ndx -p md_processed.top -t md_state.cpt -po protein_ie_mdout.mdp -pp protein_ie_processed.top -o protein_ie.tpr -maxwarn 3

why this tpr (protein_ie.tpr ) having all the atoms how to strip the unrequired atoms from tpr ?

You are not generating a tpr file for the protein only. You need to remove all other molecules from your topology file and gro file you pass to grompp.

how to do the same ?