[Bio] / Sprout / SHDrugSearch.pm Repository:
ViewVC logotype

Diff of /Sprout/SHDrugSearch.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11, Thu Dec 6 14:58:03 2007 UTC revision 1.12, Mon Jan 19 21:56:19 2009 UTC
# Line 4  Line 4 
4    
5      use strict;      use strict;
6      use Tracer;      use Tracer;
7      use CGI;      use CGI qw(-nosticky);
8      use HTML;      use HTML;
9      use Sprout;      use Sprout;
10      use RHLigands;      use RHLigands;
# Line 117  Line 117 
117      # Get the parameters.      # Get the parameters.
118      my ($cgi, $pdbID) = @_;      my ($cgi, $pdbID) = @_;
119      # Compose the link.      # Compose the link.
120      my $retVal = $cgi->a({href => "http://www.rcsb.org/pdb/explore.do?structureId=$pdbID",      my $retVal = CGI::a({href => "http://www.rcsb.org/pdb/explore.do?structureId=$pdbID",
121                            title => "display this protein's page in the Protein Data Bank",                            title => "display this protein's page in the Protein Data Bank",
122                            alt =>  "display this protein's page in the Protein Data Bank",                            alt =>  "display this protein's page in the Protein Data Bank",
123                            target => "_blank"}, $pdbID);                            target => "_blank"}, $pdbID);
# Line 155  Line 155 
155      # Compute the number of rows to display in the selection list.      # Compute the number of rows to display in the selection list.
156      my $rowCount = (scalar(@pdbNames) < 20 ? scalar(@pdbNames) : 20);      my $rowCount = (scalar(@pdbNames) < 20 ? scalar(@pdbNames) : 20);
157      # Convert the PDB list into a selection list.      # Convert the PDB list into a selection list.
158      my $menu = $cgi->popup_menu(-name => 'PDB', -values => \@pdbNames,      my $menu = CGI::popup_menu(-name => 'PDB', -values => \@pdbNames,
159                                  -labels => \%pdbStrings,                                  -labels => \%pdbStrings,
160                                  -default => $defaultPDB, -rows => $rowCount);                                  -default => $defaultPDB, -rows => $rowCount);
161      # Build a table from the PDB list and the submit row.      # Build a table from the PDB list and the submit row.
162      my @rows = ($cgi->Tr($cgi->th('Project'), $cgi->td($menu)),      my @rows = (CGI::Tr(CGI::th('PDB'), CGI::td($menu)),
163                  $self->SubmitRow()                  $self->SubmitRow()
164                 );                 );
165      $retVal .= $self->MakeTable(\@rows);      $retVal .= $self->MakeTable(\@rows);
# Line 221  Line 221 
221              my ($id, $total, $electro, $vander, $tool) = $record->Values(['Ligand(id)',              my ($id, $total, $electro, $vander, $tool) = $record->Values(['Ligand(id)',
222                                                                            'DocksWith(total-energy)',                                                                            'DocksWith(total-energy)',
223                                                                            'DocksWith(electrostatic-energy)',                                                                            'DocksWith(electrostatic-energy)',
224                                                                            'DocksWith(vanderwalls-energy)',                                                                            'DocksWith(vanderwaals-energy)',
225                                                                            'DocksWith(tool)']);                                                                            'DocksWith(tool)']);
226              # Format the energy results so they don't look so awful.              # Format the energy results so they don't look so awful.
227              ($total, $electro, $vander) = map { sprintf('%.2f', $_) } ($total, $electro, $vander);              ($total, $electro, $vander) = map { sprintf('%.2f', $_) } ($total, $electro, $vander);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3