# Constraining two water droplets at constant distance between their COMs using pull code

**URL:** <https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329>\
**Category:** User discussions\
**Tags:** mdp-parameters, umbrella-sampling, pull-code\
**Created:** [May 3, 2023, 9:53am UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329 "2023-05-03T09:53:02Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![tonmoy](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tonmoy](https://gromacs.bioexcel.eu/u/tonmoy)\
**Post date:** [May 6, 2023, 9:52am UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/21 "2023-05-06T09:52:38Z")

</div>

Thank you for your suggestion.

---

<div class="post-metadata">

**Author:** ![tonmoy](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tonmoy](https://gromacs.bioexcel.eu/u/tonmoy)\
**Post date:** [May 6, 2023, 9:58am UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/22 "2023-05-06T09:58:17Z")

</div>

In the previous results, the temperatures extracted from the velocities of the atom groups needed to be corrected based on the no. of constraints imposed.

The **command used** for extracting the temperature values from the trajectory velocities: gmx\_mpi traj -f nvt.trr -s nvt.tpr -ot temp\_SOL1.xvg -w -b 0 -e 5000

**Correction needed:** T\_real = T\_calculated \* [3_natoms / (3_natoms - nconstraints)] (Reference: [How can I obtain the temperature of a specific group?](https://gromacs.bioexcel.eu/t/how-can-i-obtain-the-temperature-of-a-specific-group/3423))

Here

natoms = no. of atoms in the water molecule = 4  
nconstraints = no. of constraints = 6 (3 for SETTLES in the topology file of water molecule + 3 for the constraining all the bonds by LINCS in MDP file)  
T\_real = T\_calculated x 2

The corrected temperature profile is shown in the image below which matches with the set temperatures.

 ![Combined analysis](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/6/64e1b295d3dcd0f642d895862881b50984142017.png)

For the second simulation, as the temperature of both droplets are maintained at 300K. there is no evaporation and no fluctuations. However, the droplet splits into 2 over a longer time.

Kindly suggest as to what might be the cause of the droplet splitting.

Thanks and regards,  
Tonmoy Sharma

---

<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:** [May 7, 2023, 1:26am UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/23 "2023-05-07T01:26:31Z")

</div>

Are you applying any type of COM motion removal? As this is essentially a system in the gas phase, I would expect `comm-mode = angular` to be appropriate here. It seems to be that SOL1 is spinning around SOL2 and I wonder if it is somehow acquiring some kind of artificial force that shears it apart.

---

<div class="post-metadata">

**Author:** ![tonmoy](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tonmoy](https://gromacs.bioexcel.eu/u/tonmoy)\
**Post date:** [May 7, 2023, 2:20pm UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/24 "2023-05-07T14:20:29Z")

</div>

Dear sir,

Thank you so much for your suggestion.

Previously I was using the following:

> comm-mode = Linear  
> nstcomm = 1  
> comm-grps = System  
> This led to the movement of the droplets around the box.

Now, I have used the following:

> comm-mode = angular  
> nstcomm = 1  
> comm-grps = SOL1 SOL2

Now the droplets are almost pinned to their initial positions and the droplet evaporation is also minimal. However, I faced too many LINCS warnings after ~ 4.2 ns which terminated the simulation. Is this due to the MDP options set in the new simulations?

Kindly also suggest if such MDP options (comm-mode) will hamper the free energy calculations later using WHAM analysis.

Thanks and regards,  
Tonmoy Sharma

---

<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:** [May 8, 2023, 7:27am UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/25 "2023-05-08T07:27:25Z")

</div>

I don’t understand how you can use LINCS for constraining bonds in a water molecule that already uses SETTLE for constraints.

---

<div class="post-metadata">

**Author:** ![tonmoy](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tonmoy](https://gromacs.bioexcel.eu/u/tonmoy)\
**Post date:** [May 8, 2023, 12:45pm UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/26 "2023-05-08T12:45:49Z")

</div>

Dear sir,

I will be using other molecules in further simulations wherein the SETTLES is not inherently defined for the molecules. So I will have to use LINCS in such simulations, wherein the water molecules will also be treated the similar way. Also the SETTLES defines the constant distance between H atoms (dhh), which will not be constrained by the LINCS. Hence. I am using LINCS along with the SETTLES to constraint all bonds and distances.  
Kindly suggest whether this method is appropriate or there are other simple alternate methods.

With regards  
Tonmoy Sharma

---

<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:** [May 8, 2023, 12:47pm UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/27 "2023-05-08T12:47:50Z")

</div>

So in the simulation where you got LINCS warnings you not only have water but also other types of molecules?

---

<div class="post-metadata">

**Author:** ![tonmoy](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tonmoy](https://gromacs.bioexcel.eu/u/tonmoy)\
**Post date:** [May 8, 2023, 1:55pm UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/28 "2023-05-08T13:55:25Z")

</div>

Dear sir,

This simulation only contains only water molecules. This simulation is the base for our further simulations.  
I have figured out that the LINCS warning is given for an isolated water molecule moving in the box. I am not understanding why. Kindly refer the image below:

 ![Screenshot 2023-05-08 192225](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/b/b653a071291e8499248413384ff77fcb2bdda2af.png)

Thanks and regards  
Tonmoy Sharma

---

<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:** [May 8, 2023, 2:14pm UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/29 "2023-05-08T14:14:27Z")

</div>

Images are not useful.

I don’t understand how you can have LINCS on a water molecule when you are using SETTLE. Either you are using SETTLE or you are using LINCS, you can’t use both at the same time.

---

<div class="post-metadata">

**Author:** ![tonmoy](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tonmoy](https://gromacs.bioexcel.eu/u/tonmoy)\
**Post date:** [May 8, 2023, 6:11pm UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/30 "2023-05-08T18:11:17Z")

</div>

Dear sir,

Thank you for suggestion.

With regards  
Tonmoy Sharma

---

<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:** [May 9, 2023, 9:11am UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/31 "2023-05-09T09:11:13Z")

</div>

But do you have only water, and both SETTLE and LINCS? Or do you have more than only water?

---

<div class="post-metadata">

**Author:** ![tonmoy](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tonmoy](https://gromacs.bioexcel.eu/u/tonmoy)\
**Post date:** [May 9, 2023, 10:18am UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/32 "2023-05-09T10:18:25Z")

</div>

Dear sir,

In this simulation, I have only two types of water molecules (SOL1 and SOL2). Only difference between these are the resiude names (for simulation convenience), and one of these is defined using SETTLES and the other is defined using [constraints] same as the doh and dhh of SETTLES in the topology file. We needed to do this as SETTLES cannot be used for two moleculetypes (SOL1 & SOL2). The water model used is OPC water model. These are again further constrained using LINCS (in MDP file) during the mdrun.

I have simulated previously using the same conditions and I was able to validate the equilibrium state with experimental results such as surface tension and density. Even now, the LINCS warning is given when the angle is rotated more than 30 degree as specidified in the MDP file. Untill then there are no errors.

Sir, I need to constrain the water molecule O-H and H-H distances as defined for OPC water model, but how shall I specify these values without using SETTLES or [constraints] in topology file. Is there any other way?

Thanks and regards  
Tonmoy Sharma

---

<div class="post-metadata">

**Author:** ![tonmoy](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tonmoy](https://gromacs.bioexcel.eu/u/tonmoy)\
**Post date:** [May 9, 2023, 10:24am UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/33 "2023-05-09T10:24:36Z")

</div>

Sir, later I will be using organic molecules with these water molecules. But we havent done that yet. These organic molecules will require LINCS, but then I think we will not be able to exclude the water molecules from LINCS constraints in the same simulation. Hence, for now with only water molecules (SOL1 and SOL2), I am using both LINCS and constraints in the topology together.  
I understand that using LINCS and constraints in the topology is creating redundancies, but I am a little confused as to how we can avoid this.

---

<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:** [May 9, 2023, 11:36am UTC](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329/34 "2023-05-09T11:36:26Z")

</div>

If the distances and masses are the same, you should be able to use SETTLE for both.

[Previous page](https://gromacs.bioexcel.eu/t/constraining-two-water-droplets-at-constant-distance-between-their-coms-using-pull-code/6329.md?page=1)
