# How to use GROMACS to implement that the thermostat was applied only in one or two directions?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-use-gromacs-to-implement-that-the-thermostat-was-applied-only-in-one-or-two-directions/5030>\
**Category:** User discussions\
**Created:** [October 16, 2022, 8:02am UTC](https://gromacs.bioexcel.eu/t/how-to-use-gromacs-to-implement-that-the-thermostat-was-applied-only-in-one-or-two-directions/5030 "2022-10-16T08:02:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wenchuan](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@Wenchuan](https://gromacs.bioexcel.eu/u/Wenchuan)\
**Post date:** [October 16, 2022, 8:02am UTC](https://gromacs.bioexcel.eu/t/how-to-use-gromacs-to-implement-that-the-thermostat-was-applied-only-in-one-or-two-directions/5030/1 "2022-10-16T08:02:50Z")

</div>

GROMACS version: 2020.6  
GROMACS modification: Yes  
How to use GROMACS to implement that the thermostat was applied only in one or two directions?  
I want to apply it to the walls of the shear simulation.

---

<div class="post-metadata">

**Author:** ![MichelePellegrino](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/michelepellegrino/32/628_2.png) [@MichelePellegrino](https://gromacs.bioexcel.eu/u/MichelePellegrino)\
**Post date:** [October 22, 2022, 4:29pm UTC](https://gromacs.bioexcel.eu/t/how-to-use-gromacs-to-implement-that-the-thermostat-was-applied-only-in-one-or-two-directions/5030/2 "2022-10-22T16:29:14Z")

</div>

Hi Wenchuan,

At the present moment, there is no way to have a non-isotropic thermostat other than implement-it-yourself.

However, you can have a look at this publication, where they use exactly the thermostat you are looking for: [Phys. Rev. Fluids 7, L102001 (2022) - Resolving the microscopic hydrodynamics at the moving contact line](https://journals.aps.org/prfluids/abstract/10.1103/PhysRevFluids.7.L102001). They even provide a patch (either in the supplementary material or in the Zenodo dataset linked to the paper) to easily port the non-isotropic thermostat to Gromacs. Unfortunately, if I recall correctly they are using Gromacs 2019, hence you will most probably have to do a bit of manual hacking to make it work on earlier versions anyway.

Michele

---

<div class="post-metadata">

**Author:** ![Wenchuan](https://avatars.discourse-cdn.com/v4/letter/w/5f9b8f/32.png) [@Wenchuan](https://gromacs.bioexcel.eu/u/Wenchuan)\
**Post date:** [October 28, 2022, 2:48am UTC](https://gromacs.bioexcel.eu/t/how-to-use-gromacs-to-implement-that-the-thermostat-was-applied-only-in-one-or-two-directions/5030/3 "2022-10-28T02:48:55Z")

</div>

Hi Michele

Thank you very much for your prompt reply. I have contacted the author and they have solved my problem.

Best,  
Wenchuan
