WWW::Search::PubChem - Access PubChem's database of chemicals
use WWW::Search; my $search = new WWW::Search('PubChem'); my @ids = qw/ 126941 3253 77231 /; $search->native_query( \@ids ); while( my $chem = $search->next_result ) { printf "PubChem ID: %s\n", $chem->{pubchemid}; printf "IUPAC name: %s\n", $chem->{iupac_name}; printf "SMILES string: %s\n", $chem->{smiles}; printf "Molecular formula: %s\n", $chem->{molecular_formula}; printf "Molecular weight: %s\n", $chem->{molecular_weight}; printf "Exact mass: %s\n", $chem->{exact_mass}; printf "# H-bond acceptors: %d\n", $chem->{nhacceptors}; printf "# H-bond donors: %d\n", $chem->{nhdonors}; printf "# Rotatable bonds: %d\n", $chem->{nrotbonds}; printf "Fingerprint: %s\n", $chem->{fingerprint}; printf "InChI string: %s\n", $chem->{inchi}; printf "XLogP2: %s\n", $chem->{xlogp2}; printf "Polar surface area: %s\n", $chem->{tpsa}; printf "Monoisotopic weight: %s\n", $chem->{monoisotopic_weight}; }
David J. Iberri, <diberri at cpan.org>
<diberri at cpan.org>
Please report any bugs or feature requests to bug-www-search-pubchem at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Search-PubChem. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-www-search-pubchem at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc WWW::Search::PubChem
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/WWW-Search-PubChem
CPAN Ratings
http://cpanratings.perl.org/d/WWW-Search-PubChem
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Search-PubChem
Search CPAN
http://search.cpan.org/dist/WWW-Search-PubChem
Copyright 2007 David J. Iberri, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WWW::Search::PubChem, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Search::PubChem
CPAN shell
perl -MCPAN -e shell install WWW::Search::PubChem
For more information on module installation, please visit the detailed CPAN module installation guide.