# How to calculate the RDFfunction between the center of mass (com) of the micelle and drug B

**URL:** <https://gromacs.bioexcel.eu/t/how-to-calculate-the-rdffunction-between-the-center-of-mass-com-of-the-micelle-and-drug-b/8198>\
**Category:** User discussions\
**Created:** [February 2, 2024, 1:26am UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-the-rdffunction-between-the-center-of-mass-com-of-the-micelle-and-drug-b/8198 "2024-02-02T01:26:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xieliqiang](https://avatars.discourse-cdn.com/v4/letter/x/ea666f/32.png) [@xieliqiang](https://gromacs.bioexcel.eu/u/xieliqiang)\
**Post date:** [February 2, 2024, 1:26am UTC](https://gromacs.bioexcel.eu/t/how-to-calculate-the-rdffunction-between-the-center-of-mass-com-of-the-micelle-and-drug-b/8198/1 "2024-02-02T01:26:56Z")

</div>

GROMACS version:2023.1  
GROMACS modification:No  
Here post your question

Dear everyone，  
i have a micelle composed of 40 molecules A, and i have a drug molecule B. i want to calculate the rdf function between the center of mass (com) of the micelle and drug B, but i can not get a proper result.( the drug was on the surface of the micelle ,but the rdf was not right.  
my command line is :  
gmx rdf -f trajout.xtc -s md1.tpr -n index.ndx -ref “com of group A” -sel “com of group B” -bin 0.03

how should i do next .  
thank you in advance.
