Chemistry::File::SLN

Chemistry::File::SLN is a SLN linear notation parser/writer.
Download

Chemistry::File::SLN Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ivan Tubert-Brohman
  • Publisher web site:
  • http://search.cpan.org/~itub/

Chemistry::File::SLN Tags


Chemistry::File::SLN Description

Chemistry::File::SLN is a SLN linear notation parser/writer. SYNOPSYS #!/usr/bin/perl use Chemistry::File::SLN; # parse a SLN string for benzene my $s = 'CH:CH:CH:CH:CH:CH@1'; my $mol = Chemistry::Mol->parse($s, format => 'sln'); # print a SLN string print $mol->print(format => 'sln'); # print a unique (canonical) SLN string print $mol->print(format => 'sln', unique => 1); # parse a multiline SLN file my @mols = Chemistry::Mol->read("file.sln", format => 'sln'); # write a multiline SLN file Chemistry::Mol->write("file.sln", mols => );This module parses a SLN (Sybyl Line Notation) string. This is a File I/O driver for the PerlMol project. http://www.perlmol.org/. It registers the 'sln' format with Chemistry::Mol, and recognizes filenames ending in '.sln'.Optional attributes for atoms, bonds, and molecules are stored as $atom->attr("sln/attr"), $bond->attr("sln/attr"), and $mol->attr("sln/attr"), respectively. Boolean attributes are stored with a value of 'TRUE'. That's the way boolean attributes are recognized when writing, so that they can be written in the shortened form. $sln_attr->{backbone} = 1; # would be ouput as "C" $sln_attr->{backbone} = 'TRUE'; # would be ouput as "C"Also note that attribute names are normalized to lowercase on reading. Requirements: · Perl


Chemistry::File::SLN Related Software