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

Class Molecule

source code

object --+
         |
        Molecule

Represent a Webel Molecule.

Required parameter:
   smiles -- a SMILES string or any type of cinfony Molecule

Attributes:
   formula, molwt, title

Methods:
   calcfp(), calcdesc(), draw(), write() 
  
The underlying SMILES string can be accessed using the attribute:
   smiles

Instance Methods
 
__init__(self, smiles)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
formula(self) source code
 
molwt(self) source code
 
calcdesc(self, descnames=[])
Calculate descriptor values.
source code
 
calcfp(self, fptype="std")
Calculate a molecular fingerprint.
source code
 
write(self, format="smi", filename=None, overwrite=False)
Write the molecule to a file or return a string.
source code
 
__str__(self)
str(x)
source code
 
draw(self)
Create a 2D depiction of the molecule.
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, smiles)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

formula(self)

source code 
Decorators:
  • @property

molwt(self)

source code 
Decorators:
  • @property

calcdesc(self, descnames=[])

source code 
Calculate descriptor values.

Optional parameter:
   descnames -- a list of names of descriptors

If descnames is not specified, all available descriptors are
calculated. See the descs variable for a list of available
descriptors.

calcfp(self, fptype="std")

source code 
Calculate a molecular fingerprint.

Optional parameters:
   fptype -- the fingerprint type (default is "std"). See the
             fps variable for a list of of available fingerprint
             types.

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 informats 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.

To write multiple molecules to the same file you should use
the Outputfile class.

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)