# Can't calculate dielectric constant of a big simulation

**URL:** <https://gromacs.bioexcel.eu/t/cant-calculate-dielectric-constant-of-a-big-simulation/1508>\
**Category:** User discussions\
**Created:** [January 29, 2021, 4:42am UTC](https://gromacs.bioexcel.eu/t/cant-calculate-dielectric-constant-of-a-big-simulation/1508 "2021-01-29T04:42:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charro](https://avatars.discourse-cdn.com/v4/letter/c/dec6dc/32.png) [@Charro](https://gromacs.bioexcel.eu/u/Charro)\
**Post date:** [January 29, 2021, 4:42am UTC](https://gromacs.bioexcel.eu/t/cant-calculate-dielectric-constant-of-a-big-simulation/1508/1 "2021-01-29T04:42:14Z")

</div>

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

Hello everyone!  
I’ve been working on a 512 molecules system, I ran 400,000,000 steps with a dt=0.002, rlist=1.2, coulombtype=PME, DispCorr=EnergPres, NPT. I tried to calculate the dielectric constant using gmx dipoles, but the process is killed at 542000 ps. I tried a few options but the process is killed at the same time. Is there a problem calculating properties for a big simulation?

Thanks for the help

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [January 29, 2021, 9:38am UTC](https://gromacs.bioexcel.eu/t/cant-calculate-dielectric-constant-of-a-big-simulation/1508/2 "2021-01-29T09:38:49Z")

</div>

Hi,  
Have you checked that your traj file is not corrupted?  
You can use gmx check to do that.  
Best regards  
Alessandra

---

<div class="post-metadata">

**Author:** ![Charro](https://avatars.discourse-cdn.com/v4/letter/c/dec6dc/32.png) [@Charro](https://gromacs.bioexcel.eu/u/Charro)\
**Post date:** [January 29, 2021, 1:28pm UTC](https://gromacs.bioexcel.eu/t/cant-calculate-dielectric-constant-of-a-big-simulation/1508/3 "2021-01-29T13:28:24Z")

</div>

I used gmx check and got this:

```
Reading file file.tpr, VERSION 2020.4 (single precision)
Checking file file.trr
trr version: GMX_trn_file (single precision)
Reading frame 0 time 0.000   
`# Atoms 8704`
Last frame 800000 time 800000.000   

Item #frames Timestep (ps)
Step 800001 1
Time 800001 1
Lambda 800001 1
Coords 800001 1
Velocities 800001 1
Forces 800001 1
Box 800001 1

```

Does this mean that none file is corrupted?

---

<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, 2021, 1:53pm UTC](https://gromacs.bioexcel.eu/t/cant-calculate-dielectric-constant-of-a-big-simulation/1508/4 "2021-01-29T13:53:18Z")

</div>

You may simply be running out of memory trying to do that calculation. Does the command complete successfully when limiting the number of frames read, e.g. by setting `-e` and a short time?

---

<div class="post-metadata">

**Author:** ![Charro](https://avatars.discourse-cdn.com/v4/letter/c/dec6dc/32.png) [@Charro](https://gromacs.bioexcel.eu/u/Charro)\
**Post date:** [January 29, 2021, 1:58pm UTC](https://gromacs.bioexcel.eu/t/cant-calculate-dielectric-constant-of-a-big-simulation/1508/5 "2021-01-29T13:58:37Z")

</div>

Yes, when I set the -e option eg. -e 10000, there’s no problem. I got around 400 GB of free space, is that the type of memory you’re talking about?

---

<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, 2021, 2:15pm UTC](https://gromacs.bioexcel.eu/t/cant-calculate-dielectric-constant-of-a-big-simulation/1508/6 "2021-01-29T14:15:17Z")

</div>

Disk space isn’t relevant, it’s the amount of memory used in the calculation. Since `gmx dipoles` is looping over all the molecules and all the frames to compute the dielectric, it requires a lot of memory.

---

<div class="post-metadata">

**Author:** ![Charro](https://avatars.discourse-cdn.com/v4/letter/c/dec6dc/32.png) [@Charro](https://gromacs.bioexcel.eu/u/Charro)\
**Post date:** [January 29, 2021, 2:23pm UTC](https://gromacs.bioexcel.eu/t/cant-calculate-dielectric-constant-of-a-big-simulation/1508/7 "2021-01-29T14:23:10Z")

</div>

So I need to increase the memory, got it. Thank you very much!
