Package cinfony :: Module opsin :: Class Molecule
[frames] | no frames]

Class Molecule

source code

object --+
         |
        Molecule

Represent a opsinjpype Molecule.

Required parameters:
   OpsinResult -- the result of using OPSIN to parse an IUPAC string

Methods:
   write()
  
The underlying OpsinResult can be accessed using the attribute:
   OpsinResult

Instance Methods
 
__init__(self, OpsinResult)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code
 
write(self, format='smi', filename=None, overwrite=False)
Write the molecule to a file or return a string.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, OpsinResult)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

write(self, format='smi', filename=None, overwrite=False)

source code 
Write the molecule to a file or return a string.

Optional parameters:
   format -- see the outformats variable for a list of available
             output formats (default is "smi")
   filename -- default is None
   overwite -- if the output file already exists, should it
               be overwritten? (default is False)

If a filename is specified, the result is written to a file.
Otherwise, a string is returned containing the result.