# Problem with calculate van der Waals and electrostatic energy

**URL:** <https://gromacs.bioexcel.eu/t/problem-with-calculate-van-der-waals-and-electrostatic-energy/5670>\
**Category:** User discussions\
**Created:** [January 29, 2023, 7:37pm UTC](https://gromacs.bioexcel.eu/t/problem-with-calculate-van-der-waals-and-electrostatic-energy/5670 "2023-01-29T19:37:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vader](https://avatars.discourse-cdn.com/v4/letter/v/9d8465/32.png) [@vader](https://gromacs.bioexcel.eu/u/vader)\
**Post date:** [January 29, 2023, 7:37pm UTC](https://gromacs.bioexcel.eu/t/problem-with-calculate-van-der-waals-and-electrostatic-energy/5670/1 "2023-01-29T19:37:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [January 29, 2023, 8:13pm UTC](https://gromacs.bioexcel.eu/t/problem-with-calculate-van-der-waals-and-electrostatic-energy/5670/2 "2023-01-29T20:13:40Z")

</div>

See the analysis section of this tutorial: [Protein-Ligand Complex](http://www.mdtutorials.com/gmx/complex/index.html)

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