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


Manual Reference Pages  -  CHEMISTRY::MOK (3)

.ds Aq ’

NAME

Chemistry::Mok - molecular awk interpreter

CONTENTS

SYNOPSIS



    use Chemistry::Mok;
    $code = /CS/g{ $n++; $l += $match->bond_map(0)->length }
        END { printf "Average C-S bond length: %.3f\n", $l/$n; };

    my $mok = Chemistry::Mok->new($code);
    $mok->run({ format => mdlmol }, glob("*.mol"));



DESCRIPTION

This module is the engine behind the mok program. See mok(1) for a detailed description of the language. Mok is part of the PerlMol project, <http://www.perlmol.org>.

METHODS

Chemistry::Mok->new($code, %options) Compile the code and return a Chemistry::Mok object. Available options:
package If the package option is given, the code runs in the Chemistry::Mok::UserCode::$options{package} package instead of the Chemistry::Mok::UserCode::Default package. Specifying a package name is recommended if you have more than one mok object and you are using global varaibles, in order to avoid namespace clashes.
pattern_format The name of the format which will be used for parsing slash-delimited patterns that don’t define an explicit format. Mok versions until 0.16 only used the ’smiles’ format, but newer versions can use other formats such as ’smarts’, ’midas’, ’formula_pattern’, and ’sln’, if available. The default is ’smarts’.
$mok->run($options, @args) Run the code on the filenames contained in @args. $options is a hash reference with runtime options. Available options:
build_3d Generate 3D coordinates using Chemistry::3DBuilder.
aromatize Aromatize each molecule as it is read. This is needed for example for matching SMARTS patterns that use aromaticity or ring primitives.
delete_dummies Delete dummy atoms after reading each molecule. A dummy atom is defined as an atom with an unknown symbol (i.e., it doesn’t appear on the periodic table), or an atomic number of zero.
find_bonds If set to a true value, find bonds. Use it when reading files with no bond information but 3D coordinates to detect the bonds if needed (for example, if you want to do match a pattern that includes bonds). If the file has explicit bonds, mok will not try to find the bonds, but it will reassign the bond orders from scratch.
format The format used when calling $mol_class->read. If not given, $mol_class->read tries to identify the format automatically.
mol_class The molecule class used for reading the files. Defaults to Chemistry::Mol.

VERSION

0.25

SEE ALSO

mok, <http://www.perlmol.org/>

AUTHOR

Ivan Tubert-Brohman <itub@cpan.org>

COPYRIGHT

Copyright (c) 2005 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.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CHEMISTRY::MOK (3) 2005-05-16

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