GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Chemistry::File::FormulaPattern(3) User Contributed Perl Documentation Chemistry::File::FormulaPattern(3)

Chemistry::File::FormulaPattern - Wrapper Chemistry::File class for Formula patterns

    use Chemistry::File::FormulaPattern;

    # somehow get a bunch of molecules...
    use Chemistry::File::SDF;
    my @mols = Chemistry::Mol->read("file.sdf");

    # we want molecules with six carbons and 8 or more hydrogens
    my $patt = Chemistry::Pattern->new("C6H8-", format => "formula_pattern");

    for my $mol (@mols) {
        if ($patt->match($mol)) {
            print $mol->name, " has a nice formula!\n";
        }
    }

    # a concise way of selecting molecules with grep
    my @matches = grep { $patt->match($mol) } @mols;

This is a wrapper class for reading Formula Patterns using the standard Chemistry::Mol I/O interface. This allows Formula patterns to be used interchangeably with other pattern languages such as SMARTS in the context of programs such as mok. All of the real work is done by Chemistry::FormulaPattern.

This module register the 'formula_pattern' format with Chemistry::Mol.

0.10

Chemistry::Pattern, Chemistry::File, Chemistry::Mol, Chemistry::MacroMol, mok.

The PerlMol website <http://www.perlmol.org/>

Ivan Tubert-Brohman <itub@cpan.org>

Copyright (c) 2004 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2004-08-11 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.