Mercurial > repos > deepakjadmin > mayatool3_test3
diff mayachemtools/docs/modules/html/MoleculeFileIO.html @ 0:73ae111cf86f draft
Uploaded
author | deepakjadmin |
---|---|
date | Wed, 20 Jan 2016 11:55:01 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mayachemtools/docs/modules/html/MoleculeFileIO.html Wed Jan 20 11:55:01 2016 -0500 @@ -0,0 +1,160 @@ +<html> +<head> +<title>MayaChemTools:Documentation:MoleculeFileIO.pm</title> +<meta http-equiv="content-type" content="text/html;charset=utf-8"> +<link rel="stylesheet" type="text/css" href="../../css/MayaChemTools.css"> +</head> +<body leftmargin="20" rightmargin="20" topmargin="10" bottommargin="10"> +<br/> +<center> +<a href="http://www.mayachemtools.org" title="MayaChemTools Home"><img src="../../images/MayaChemToolsLogo.gif" border="0" alt="MayaChemTools"></a> +</center> +<br/> +<div class="DocNav"> +<table width="100%" border=0 cellpadding=0 cellspacing=2> +<tr align="left" valign="top"><td width="33%" align="left"><a href="./Molecule.html" title="Molecule.html">Previous</a> <a href="./index.html" title="Table of Contents">TOC</a> <a href="./NucleicAcids.html" title="NucleicAcids.html">Next</a></td><td width="34%" align="middle"><strong>MoleculeFileIO.pm</strong></td><td width="33%" align="right"><a href="././code/MoleculeFileIO.html" title="View source code">Code</a> | <a href="./../pdf/MoleculeFileIO.pdf" title="PDF US Letter Size">PDF</a> | <a href="./../pdfgreen/MoleculeFileIO.pdf" title="PDF US Letter Size with narrow margins: www.changethemargins.com">PDFGreen</a> | <a href="./../pdfa4/MoleculeFileIO.pdf" title="PDF A4 Size">PDFA4</a> | <a href="./../pdfa4green/MoleculeFileIO.pdf" title="PDF A4 Size with narrow margins: www.changethemargins.com">PDFA4Green</a></td></tr> +</table> +</div> +<p> +</p> +<h2>NAME</h2> +<p>MoleculeFileIO</p> +<p> +</p> +<h2>SYNOPSIS</h2> +<p>use MoleculeFileIO;</p> +<p>use MoleculeFileIO qw(:all);</p> +<p> +</p> +<h2>DESCRIPTION</h2> +<p><strong>MoleculeFileIO</strong> class provides the following methods:</p> +<p> <a href="#new">new</a>, <a href="#close">Close</a>, <a href="#issupportedmoleculefileformat">IsSupportedMoleculeFileFormat</a>, <a href="#open">Open</a>, <a href="#readmolecule">ReadMolecule</a> +, <a href="#readmoleculestring">ReadMoleculeString</a>, <a href="#writemolecule">WriteMolecule</a> +</p><p>The following methods can also be used as functions:</p> +<p>IsSupportedMoleculeFileFormat</p> +<p> +</p> +<h2>METHODS</h2> +<dl> +<dt><strong><a name="new" class="item"><strong>new</strong></a></strong></dt> +<dd> +<div class="OptionsBox"> + $NewMoleculeFileIO = new MoleculeFileIO([%PropertyNameAndValues]);</div> +<p>Using specified <em>MoleculeFileIO</em> property names and values hash, <strong>new</strong> method +creates a new object and returns a reference to newly created <strong>MoleculeFileIO</strong> object. +By default, following properties are initialized:</p> +<div class="OptionsBox"> + Name = "" +<br/> Mode = "" +<br/> FileIORef = ""</div> +<p>Based on extension of specified file <em>Name</em>, an input class is automatically associated to +provide molecule read and write methods.</p> +<p>Examples:</p> +<div class="OptionsBox"> + $Name = "Water.mol"; +<br/> $Mode = "Read"; +<br/> $MoleculeFileIO = new MoleculeFileIO('Name' => $Name, + 'Mode' => $Mode); +<br/> $MoleculeFileIO->Open(); +<br/> $Molecule = $MoleculeFileIO->ReadMolecule(); +<br/> $Molecule->DetectRings(); +<br/> print "$Molecule\n"; +<br/> $MoleculeFileIO->Close();</div> +<div class="OptionsBox"> + $MoleculeFileIO = new MoleculeFileIO('Name' => 'Sample1.sdf', + 'Mode' => 'Read'); +<br/> $MoleculeFileIO->Open(); +<br/> while ($Molecule = $MoleculeFileIO1->ReadMolecule()) { +<br/> $Molecule->DetectRings(); +<br/> print "$Molecule\n";</div> +<div class="OptionsBox"> + $DataLabelsAndValuesRef = + $Molecule->GetDataFieldLabelAndValues(); +<br/> for $DataLabel (sort keys %{$DataLabelsAndValuesRef} ) { +<br/> $DataValue = $DataLabelsAndValuesRef->{$DataLabel}; +<br/> print "<DataLabel: $DataLabel; DataValue: $DataValue>; "; +<br/> } +<br/> print "\n"; +<br/> } +<br/> $MoleculeFileIO->Close();</div> +</dd> +<dt><strong><a name="close" class="item"><strong>Close</strong></a></strong></dt> +<dd> +<div class="OptionsBox"> + $MoleculeFileIO->Close();</div> +<p>Closes an open file</p> +</dd> +<dt><strong><a name="issupportedmoleculefileformat" class="item"><strong>IsSupportedMoleculeFileFormat</strong></a></strong></dt> +<dd> +<div class="OptionsBox"> + $Status = $MoleculeFileIO->IsSupportedMoleculeFileFormat($Name); +<br/> $Status = MoleculeFileIO::IsSupportedMoleculeFileFormat($Name); +<br/> ($Status, $FormatType, $IOClassName) = + $MoleculeFileIO::IsSupportedMoleculeFileFormat($Name);</div> +<p>Returns 1 or 0 based on whether input file <em>Name</em> format is supported. In list context, +value of supported format type and name of associated IO class is also returned.</p> +<p>File extension is used to determine file format. Currently, following file extensions are +supported:</p> +<div class="OptionsBox"> + FileExts - FormatType - AssociatedIOClassName</div> +<div class="OptionsBox"> + .mol - MDLMOL - MDLMolFileIO +<br/> .sdf, .sd - SDF - SDFileIO</div> +</dd> +<dt><strong><a name="open" class="item"><strong>Open</strong></a></strong></dt> +<dd> +<div class="OptionsBox"> + $MoleculeFileIO->Open([$Mode]);</div> +<p>Opens a file in a specified <em>Mode</em>. Default mode value: <em>Read</em>. Supported mode +values:</p> +<div class="OptionsBox"> + Read, Write, Append, <, >, >>, r, w, or a</div> +</dd> +<dt><strong><a name="readmolecule" class="item"><strong>ReadMolecule</strong></a></strong></dt> +<dd> +<div class="OptionsBox"> + $Molecule = $MoleculeFileIO->ReadMolecule();</div> +<p>Reads molecule data from the file and returns a <em>Molecule</em> object.</p> +</dd> +<dt><strong><a name="readmoleculestring" class="item"><strong>ReadMoleculeString</strong></a></strong></dt> +<dd> +<div class="OptionsBox"> + $MoleculeString = $MoleculeFileIO->ReadMoleculeString();</div> +<p>Reads molecule data from a file and returns a <em>Molecule</em> string.</p> +</dd> +<dt><strong><a name="writemolecule" class="item"><strong>WriteMolecule</strong></a></strong></dt> +<dd> +<div class="OptionsBox"> + $MoleculeFileIO->WriteMolecule();</div> +<p>Write molecule data to a file for a <em>Molecule</em>.</p> +</dd> +</dl> +<p> +</p> +<h2>AUTHOR</h2> +<p><a href="mailto:msud@san.rr.com">Manish Sud</a></p> +<p> +</p> +<h2>SEE ALSO</h2> +<p><a href="./FileIO.html">FileIO.pm</a>, <a href="./MDLMolFileIO.html">MDLMolFileIO.pm</a>, <a href="./SDFileIO.html">SDFileIO.pm</a> +</p> +<p> +</p> +<h2>COPYRIGHT</h2> +<p>Copyright (C) 2015 Manish Sud. All rights reserved.</p> +<p>This file is part of MayaChemTools.</p> +<p>MayaChemTools is free software; you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation; either version 3 of the License, or (at your option) +any later version.</p> +<p> </p><p> </p><div class="DocNav"> +<table width="100%" border=0 cellpadding=0 cellspacing=2> +<tr align="left" valign="top"><td width="33%" align="left"><a href="./Molecule.html" title="Molecule.html">Previous</a> <a href="./index.html" title="Table of Contents">TOC</a> <a href="./NucleicAcids.html" title="NucleicAcids.html">Next</a></td><td width="34%" align="middle"><strong>March 29, 2015</strong></td><td width="33%" align="right"><strong>MoleculeFileIO.pm</strong></td></tr> +</table> +</div> +<br /> +<center> +<img src="../../images/h2o2.png"> +</center> +</body> +</html>