Problem with calculate van der Waals and electrostatic energy

Hello,
I am trying calculate non bonded interactions between aminoacid resides derived from ligand and protein pocket. Firstly I prepare index file in the following way:
gmx make_ndx -f complex.pdb -o index
where complex.pdb is a pdb file, which contains all cartesian coordinates for all atoms from ligand and protein
Then, I used to calculation non bonded energy the following command:
gmx energy -f complex.pdb -o nonbonded_interactions.xvg -n index.ndx

And after this command I get the following error:
Function: void gmx::CommandLineParser::parse(int*, char**)

Error in user input:
Invalid command-line options
In command-line option -f
File name ‘complex.pdb’ cannot be used for this option.
Only the following extensions are possible:
.edr
Unknown command-line option -n

I am totally beginner user in gromacs software. Could you please help me to solve this error or indicate another way or command to calculate these interactions ?

Best regards

See the analysis section of this tutorial: Protein-Ligand Complex

In short, only mdrun can compute such energies, and they only make sense in certain contexts.