# [gmx-users] peptide's COM distance to top of a slab

Justin Lemkul jalemkul at vt.edu
Tue Aug 2 23:27:55 CEST 2016

```
On 8/2/16 5:18 PM, Alexander Alexander wrote:
> On Tue, Aug 2, 2016 at 10:49 PM, Justin Lemkul <jalemkul at vt.edu> wrote:
>
>>
>>
>> On 8/2/16 4:46 PM, Alexander Alexander wrote:
>>
>>> Thanks Mark.
>>> I do not know what do you mean with the geometric criterion, but, It is a
>>> slab/vacuum model in which vacuum is in the Z direction normal to the
>>> slab.
>>> I am just interested in vertical distance between peptide COM and top most
>>> atom.
>>>
>>>
>> Rephrasing Mark's question: "how do you define the topmost atom?"  Then it
>> becomes simple to do.  You have coordinates, therefore a geometry...
>>
>
> Of course the most top layer has coordinate and geometry, you mean then I
> can again define an index file with the most top atoms?
> One way that I know but I do not like it is first calulate COM(peptide) to
> COM(slab) and then subtract it by a constant which is half of the slab
> thickness.  [COM(peptide)-COM(slab)] - [slab(thicjness)/2]. But I am
> looking for a more straight one.
>

Yes, you can define any atom or atoms that you like that define the "top" of the
slab.  gmx distance will give you what you want with no additional effort, as
long as you define the index group suitably.

-Justin

>>
>> One more question is that how I can calculate the distance between the two
>>> termini of a peptide versas time?
>>>
>>>
>> As you would the COM distance between any other species.  Create an index
>> file with the first and last residue as separate groups.
>>
>
>
>>
>> -Justin
>>
>>
>> Thanks,
>>> Alex
>>>
>>> On Tue, Aug 2, 2016 at 10:35 PM, Mark Abraham <mark.j.abraham at gmail.com>
>>> wrote:
>>>
>>> Hi,
>>>>
>>>> What's a geometric criterion that expresses "top of the slab?"
>>>>
>>>> Mark
>>>>
>>>> On Tue, Aug 2, 2016 at 10:22 PM Alexander Alexander <
>>>> alexanderwien2k at gmail.com> wrote:
>>>>
>>>> Dear gromacs user,
>>>>>
>>>>> I have peptide getting adsorbed into a solid surface, I can get the
>>>>> distance between COM of peptide and COM of the slab by below command,
>>>>>
>>>>> gmx distance -n index.ndx -select 'com of group Other plus com of group
>>>>> Protein' -f noPBC.xtc -s prd.tpr -oxyz disxyz.xvg -tu ns
>>>>>
>>>>> I was wondering if a similar command is available to get the distance
>>>>> between peptide's COM and top of the slab?
>>>>>
>>>>> Regards,
>>>>> Alex
>>>>> --
>>>>> Gromacs Users mailing list
>>>>>
>>>>> * Please search the archive at
>>>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
>>>>> posting!
>>>>>
>>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>>
>>>>> * For (un)subscribe requests visit
>>>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>>>>> send a mail to gmx-users-request at gromacs.org.
>>>>>
>>>>> --
>>>> Gromacs Users mailing list
>>>>
>>>> * Please search the archive at
>>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
>>>> posting!
>>>>
>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>
>>>> * For (un)subscribe requests visit
>>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>>>> send a mail to gmx-users-request at gromacs.org.
>>>>
>>>>
>> --
>> ==================================================
>>
>> Justin A. Lemkul, Ph.D.
>> Ruth L. Kirschstein NRSA Postdoctoral Fellow
>>
>> Department of Pharmaceutical Sciences
>> School of Pharmacy
>> Health Sciences Facility II, Room 629
>> University of Maryland, Baltimore
>> 20 Penn St.
>> Baltimore, MD 21201
>>
>> jalemkul at outerbanks.umaryland.edu | (410) 706-7441
>> http://mackerell.umaryland.edu/~jalemkul
>>
>> ==================================================
>>
>> --
>> Gromacs Users mailing list
>>
>> * Please search the archive at
>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before
>> posting!
>>
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>
>> * For (un)subscribe requests visit
>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or
>> send a mail to gmx-users-request at gromacs.org.
>>

--
==================================================

Justin A. Lemkul, Ph.D.
Ruth L. Kirschstein NRSA Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 629
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalemkul at outerbanks.umaryland.edu | (410) 706-7441
http://mackerell.umaryland.edu/~jalemkul

==================================================
```