[gmx-users] %exist hydrogen bond
leila karami
karami.leila1 at gmail.com
Wed Feb 23 09:23:35 CET 2011
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:
# 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20110223/7854e4c5/attachment.html>
More information about the gromacs.org_gmx-users
mailing list