[gmx-users] %exist hydrogen bond

Justin A. Lemkul jalemkul at vt.edu
Wed Feb 23 12:57:24 CET 2011



leila karami wrote:
> Dear Justin
> 
> thanks for your reply.
> 
> I did what you said as follows:
> 
> your main script=
> 
> # Open up the structure file and work with it
> print "Processing coordinate file...\n";
> foreach $_ (@coord) {
>      my @line = split(" ", $_);
>      my $natom = $line[1];
>      my $name = $line[2];
>      my $resn = $line[3];
>      my $resnum = $line[4];
> 151
> 152     if ($line[0] =~ /ATOM/) {
> 153         unless ($resn =~ /SOL/) {
> 154             for (my $z=1; $z<=$nres; $z++) {
> 155                 if ($donors{$z} == $natom) {
> 156                     $donor_names[$z] = $name;
> 157                     $donor_resn[$z] = join('', $resn, $resnum);
> 158                 } elsif ($acceptors{$z} == $natom) {
> 159                     $acceptor_names[$z] = $name;
> 160                     $acceptor_resn[$z] = join('', $resn, $resnum);
> 161              }
>              }
>          }
>      }
> }
>  
> # open a single output file for writing
> 
>  
> my modified script=
> 
> # Open up the structure file and work with it
> print "Processing coordinate file...\n";
> foreach $_ (@coord) {
>      my @line = split(" ", $_);
>      my $natom = $line[1];
>      my $name = $line[2];
>      my $resn = $line[3];
>      my $resnum = $line[4];
>  
>      if ($line[0] =~ /ATOM/) {
>                       for (my $z=1; $z<=$nres; $z++) {
>                  if ($donors{$z} == $natom) {
>                      $donor_names[$z] = $name;
>                      $donor_resn[$z] = join('', $resn, $resnum);
>                  } elsif ($acceptors{$z} == $natom) {
>                      $acceptor_names[$z] = $name;
>                      $acceptor_resn[$z] = join('', $resn, $resnum);
>                 }
>          }
>      }
> }
>  
> # open a single output file for writing
> 
> is my manner true?
> when I used modified script, problem was not solved. and output file is 
> as follows:
> 

Did you delete your previous "summary_HBmap.dat" before running the script 
again?  Output will be appended rather than overwritten.

-Justin

> #    Donor                    Acceptor                % Exist.
>                                                              0.160
>       NGL1             N                                        0.400
>      ARG58           NH2                                    43.565
>      ARG58           NH2                                     1.839
>      ARG58           NH1                                     0.080
>      ARG58           NH1                                     21.663
>      ARG58           NH1                                     0.160
>      ARG58            NE                                      1.359
> . 
> .
> .
> .
>                                           GLY3             O         1.759
>                                           GLY4             O         0.400
>                                          THR47             O        61.711
>                                          ASN51           OD1        16.867
>                                          ASN51           ND2         0.320
>                                         GLN23           OE1        11.191
> .
> .
> .
> 
> how to fix it?
> -- 
> 
> Leila Karami
> Ph.D. student of Physical Chemistry
> K.N. Toosi University of Technology
> Theoretical Physical Chemistry Group
> 
> 

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

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

========================================



More information about the gromacs.org_gmx-users mailing list