# How to apply a unidirectional constant external force to all COM of a particular specie?

**URL:** <https://gromacs.bioexcel.eu/t/how-to-apply-a-unidirectional-constant-external-force-to-all-com-of-a-particular-specie/2894>\
**Category:** User discussions\
**Tags:** mdp-parameters\
**Created:** [October 1, 2021, 10:48am UTC](https://gromacs.bioexcel.eu/t/how-to-apply-a-unidirectional-constant-external-force-to-all-com-of-a-particular-specie/2894 "2021-10-01T10:48:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![organicchemistry\_01](https://avatars.discourse-cdn.com/v4/letter/o/6bbea6/32.png) [@organicchemistry\_01](https://gromacs.bioexcel.eu/u/organicchemistry_01)\
**Post date:** [October 1, 2021, 10:48am UTC](https://gromacs.bioexcel.eu/t/how-to-apply-a-unidirectional-constant-external-force-to-all-com-of-a-particular-specie/2894/1 "2021-10-01T10:48:51Z")

</div>

GROMACS version: 2021.3 / 18 August 2021  
GROMACS modification: No

I wish to add an external force to a certain specie, but basic google search seems to be not that productive.

I am thinking it would be as easy as:

```auto
uni-force-direction = 0 0 0 -1 ; specie x y z
uni-force-magnitude = 0 1000 Meganewton ; specie magnitude unit

```

But I could not find it in the documentation.

How do I do this?

---

<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:** [October 1, 2021, 11:34am UTC](https://gromacs.bioexcel.eu/t/how-to-apply-a-unidirectional-constant-external-force-to-all-com-of-a-particular-specie/2894/2 "2021-10-01T11:34:02Z")

</div>

Hi  
maybe you can try the mdp option `deform` . [Molecular dynamics parameters (.mdp options) — GROMACS 2021.3 documentation](https://manual.gromacs.org/current/user-guide/mdp-options.html?highlight=non%20equilibrium%20deformation#non-equilibrium-md)  
\Alessandra

---

<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:** [October 1, 2021, 12:02pm UTC](https://gromacs.bioexcel.eu/t/how-to-apply-a-unidirectional-constant-external-force-to-all-com-of-a-particular-specie/2894/3 "2021-10-01T12:02:00Z")

</div>

Use the pull code: [Molecular dynamics parameters (.mdp options) — GROMACS 2021.3 documentation](https://manual.gromacs.org/current/user-guide/mdp-options.html#com-pulling)
