[gmx-users] residue SASA

Diego Enry Gomes diego.enry at gmail.com
Fri Jul 8 11:56:28 CEST 2011


This is what I mean by "quick and dirty".

#!/bin/bash
# Reads the output of "g_sas" per residue (-or) and writes only the residues you want.   
# Diego E.B. Gomes, Roberto D. Lins, Pedro G. Pascutti, Thereza A. Soares
# mailto: diego at biof.ufrj.br 

#1 ) To perform multiple g_sas  (will write out all residues in many files)
for ((frame=0;frame<=10;frame=frame+1)) do
g_sas_4 -s md.tpr -f md.xtc -n index.ndx -or resarea.${frame} -o area.${frame} -oa atomarea.${frame} -b ${frame} -e ${frame} <<EOF
Protein
Protein   << you can replace this by your FAVORITE residues (though you will need to modify the rest of the script).
EOF
done

# 2) To processs the many many files and output the area for your desired residues:
#list of residues to print, in sequential order.
list="1 2 3 5 8 13 34" 

echo "# resarea for residues $list" > resarea.favorites.dat

  for ((frame=0;frame<=1000;frame=frame+1)) do
    echo -ne "$frame \r"
    cat resarea.${frame}.xvg |grep -v "#" |grep -v "@" > tmp

    i=1
    while read a b c ; do             # reads the text file
      residue[$i]=$a
      sas[$i]=$b
      stdev[$i]=$c
      i=$(($i+1))
    done < "tmp"

    j=1
    for i in `echo $list` ; do
      out[$j]=${sas[$i]}
      j=$(($i+1))
    done

    echo $frame ${out[@]} >> resarea.favorites.dat

  done
done

# :) 

On Jul 7, 2011, at 9:17 PM, Justin A. Lemkul wrote:

> 
> 
> ahmet yıldırım wrote:
>> There are hydrophilic and hydrophobic SASA values versus simulation time in the output file (area.xvg). I want to hydrophilic and hydrophobic SASA values versus residue.
> 
> That's not implemented, but it would probably be rather easy to modify the code to do so.
> 
> -Justin
> 
>> 2011/7/7 Justin A. Lemkul <jalemkul at vt.edu <mailto:jalemkul at vt.edu>>
>>    ahmet yıldırım wrote:
>>        Dear users,
>>        I want to calculate hydrophilic and hyrophobic SASA value of
>>        each residue in protein. I used a command as the following:
>>        g_sas -f run.xtc -s run.tpr -or protein_protein.xvg
>>        Select a group for calculation of surface and a group for output
>>        select a group: 1 (protein)
>>        select a group: 2 (protein)
>>        But there is SASA value of each residue in the output file. How
>>        can I seperate the residues as a hydrophilic and hyrophobic SASA?
>>    This is already in the output file.  Check the legends of area.xvg
>>    and you will see.
>>    -Justin
>>    --     ==============================__==========
>>    Justin A. Lemkul
>>    Ph.D. Candidate
>>    ICTAS Doctoral Scholar
>>    MILES-IGERT Trainee
>>    Department of Biochemistry
>>    Virginia Tech
>>    Blacksburg, VA
>>    jalemkul[at]vt.edu <http://vt.edu> | (540) 231-9080
>>    http://www.bevanlab.biochem.__vt.edu/Pages/Personal/justin
>>    <http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin>
>>    ==============================__==========
>>    --     gmx-users mailing list    gmx-users at gromacs.org
>>    <mailto:gmx-users at gromacs.org>
>>    http://lists.gromacs.org/__mailman/listinfo/gmx-users
>>    <http://lists.gromacs.org/mailman/listinfo/gmx-users>
>>    Please search the archive at
>>    http://www.gromacs.org/__Support/Mailing_Lists/Search
>>    <http://www.gromacs.org/Support/Mailing_Lists/Search> before posting!
>>    Please don't post (un)subscribe requests to the list. Use the www
>>    interface or send it to gmx-users-request at gromacs.org
>>    <mailto:gmx-users-request at gromacs.org>.
>>    Can't post? Read http://www.gromacs.org/__Support/Mailing_Lists
>>    <http://www.gromacs.org/Support/Mailing_Lists>
>> -- 
>> Ahmet YILDIRIM
> 
> -- 
> ========================================
> 
> Justin A. Lemkul
> Ph.D. Candidate
> ICTAS Doctoral Scholar
> MILES-IGERT Trainee
> Department of Biochemistry
> Virginia Tech
> Blacksburg, VA
> jalemkul[at]vt.edu | (540) 231-9080
> http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin
> 
> ========================================
> -- 
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

--
Diego E. B. Gomes
Instituto de Biofísica Carlos Chagas Filho
Universidade Federal do Rio de Janeiro
Brasil   +55 21 2562.6507

/temp @ Laboratoire de Biologie et de Pharmacologie Appliquée 
Ecole Normale Supérieure, Cachan, France
France +33 07 8638.8099







More information about the gromacs.org_gmx-users mailing list