# Stress strain profile

**URL:** <https://gromacs.bioexcel.eu/t/stress-strain-profile/7026>\
**Category:** User discussions\
**Tags:** mdp-parameters\
**Created:** [August 16, 2023, 4:52am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026 "2023-08-16T04:52:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![arsr](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@arsr](https://gromacs.bioexcel.eu/u/arsr)\
**Post date:** [August 16, 2023, 4:52am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026/1 "2023-08-16T04:52:39Z")

</div>

Dear Users,

I am actually trying to compute a stress-strain profile for a mixed polymer system where I am looking for a uniaxial deformation (x-axis).

But, I am unsure of what inputs I must write in my mdp file for ‘deform’ and ‘compressibility’. Also, in the gmx energy command, there appear a lot of vir-xx, vir-xy and P-xx, P-xy… terms which I am unsure of the correct one to be used.

Thus, I will be very grateful if you could help me to understand this. A sample mdp file with these flags would be much help.

Regards,  
Arpita

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [August 16, 2023, 6:57am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026/2 "2023-08-16T06:57:39Z")

</div>

What you need to provide depends on whether you want to impose a strain and measure the stress or impose a stress and measure the strain.

---

<div class="post-metadata">

**Author:** ![arsr](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@arsr](https://gromacs.bioexcel.eu/u/arsr)\
**Post date:** [August 16, 2023, 7:15am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026/3 "2023-08-16T07:15:41Z")

</div>

Hi Hess,

I want to impose a strain, elongate the system along x-direction and measure the stress in the system.

Regards,  
Arpita

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [August 16, 2023, 7:17am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026/4 "2023-08-16T07:17:05Z")

</div>

Then you apply a strain by setting the velocity for a off-diagonal component involving x with the deform option and measure the stress as the corresponding element of the pressure tensor.

Note that you should not use anisotropic pressure coupling. You can use an NVT or an NPT ensemble with isotropic coupling.

---

<div class="post-metadata">

**Author:** ![arsr](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@arsr](https://gromacs.bioexcel.eu/u/arsr)\
**Post date:** [August 16, 2023, 7:19am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026/5 "2023-08-16T07:19:43Z")

</div>

Thank you, Hess! Would a semi-isotropic coupling make sense in this situation?

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [August 16, 2023, 7:23am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026/6 "2023-08-16T07:23:21Z")

</div>

Why would you want to use semi-isotropic pressure coupling?

---

<div class="post-metadata">

**Author:** ![arsr](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@arsr](https://gromacs.bioexcel.eu/u/arsr)\
**Post date:** [August 16, 2023, 7:26am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026/7 "2023-08-16T07:26:59Z")

</div>

I am unsure of isotropic/semi-isotropic coupling in this situation. As I am trying to elongate the box along x-dimension, I assume that the pressure in y&z will be different than that of x. Thus, I am confused with the pressure coupling method to be used.  
It would of great help if you could clarify this doubt of mine.

Regards,  
Arpita

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [August 16, 2023, 8:04am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026/8 "2023-08-16T08:04:50Z")

</div>

I was thinking of a imposing a shear.

If you want to impose a strain along one dimension and keep the pressure along the other dimensions constant, I think there are two options:

- Use semi-isotropic pressure coupling and strain along z. I think this is the best option.
- Use anisotropic pressure coupling and strain along a chosen dimension.

In both cases the compressibility along the strain direction should be set to zero. I think this should work.

---

<div class="post-metadata">

**Author:** ![arsr](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@arsr](https://gromacs.bioexcel.eu/u/arsr)\
**Post date:** [August 16, 2023, 8:48am UTC](https://gromacs.bioexcel.eu/t/stress-strain-profile/7026/9 "2023-08-16T08:48:42Z")

</div>

That’s exactly what I want to do. Thank you for clarifying my doubts!

-Arpita
