# [gmx-users] Fwd: Calculating electron density profile of a lipid bilayer system

Thu May 30 09:56:05 CEST 2019

```Dear Gromacs users

I am trying to calculate the electron density profiles of a lipid bilayer
system. However I am not getting the correct profile. I would appreciate it
a lot if you can help me.

Following is the procedure I go through:

1- first I create a ndx file to select the resnames:

gmx select -f trj_file.trr -s tpr_file.tpr -on index_file.ndx -select
'(resname DPPC TIP3)'

2- Then I created the electron.dat file including all the atoms (including
hydrogens) of the selected atoms. The first lines look like this:
208
OH = 8
H1 = 1
H2 = 1
N = 7
C13 = 6
H13A = 1
H13B = 1
H13C = 1
C14 = 6
H14A = 1
H14B = 1
H14C = 1
C15 = 6
...

3- Then I use gmx density in order to calculate the electron density of the
selected resnames:

gmx density -f trj_file.trr -s tpr_file.tpr -n index_file.ndx -o
density_traj_center.xvg -dens electron -ei electron.dat -center -relative

However,  what I get is not similar to the ones in papers:
Best regards,
{"ft_lang_label":"__label__en","ft_lang_prob":0.7263546,"math_prob":0.44103366,"size":1189,"snap":"2019-26-2019-30","text_gpt3_token_len":380,"char_repetition_ratio":0.1257384,"word_repetition_ratio":0.009756098,"special_character_ratio":0.2859546,"punctuation_ratio":0.12653062,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9773308,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-07-17T00:06:11Z\",\"WARC-Record-ID\":\"<urn:uuid:b82f3505-768c-472d-843c-e3e870f870cd>\",\"Content-Length\":\"4129\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a268556e-d8a9-4619-b648-c1467a2de4ad>\",\"WARC-Concurrent-To\":\"<urn:uuid:fe1f1337-0356-4f2a-8c3d-40c2cbd56d23>\",\"WARC-IP-Address\":\"130.237.48.102\",\"WARC-Target-URI\":\"https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-users/2019-May/125499.html\",\"WARC-Payload-Digest\":\"sha1:CUBEEX2BDG5URWYNK7A5LLMKFWEAM7IG\",\"WARC-Block-Digest\":\"sha1:OMZQ63MC4FR65DJR6SMQAADV2QDXHYWC\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-30/CC-MAIN-2019-30_segments_1563195524972.66_warc_CC-MAIN-20190716221441-20190717003441-00181.warc.gz\"}"}