Table of Contents

Class: vertex_common | ../bkchem/special_parents.py
--- | ---
implements some properties and methods common for all vertices (children of oasa.chem_vertex), such as numbering and mark support
Base Classes |
--- | ---
object
Methods |
--- | ---
__init__ create_mark find_place_for_mark get_marks_by_type remove_mark reposition_marks set_mark
| __init__
    __init__ ( self )
| create_mark
    create_mark (
            self,
            mark='radical',
            angle='auto',
            draw=1,
            angle_resolution=1,
            )
creates the mark, does not care about the chemical meaning of this
| find_place_for_mark
    find_place_for_mark (
            self,
            mark,
            resolution=30,
            )
resolution says if the angles should be somehow `rounded`, it is given in degrees; see geometry.point_on_circle for a similar thing
| get_marks_by_type
    get_marks_by_type ( self,  mark_type )
| remove_mark
    remove_mark ( self,  mark )
mark is either mark instance of type, in case of instance, the instance is removed, in case of type a random mark of this type (if present is removed). Returns the removed mark or None
Exceptions |
--- | ---
TypeError, "mark is on unknown type " + str( mark ) ValueError, "trying to remove a mark that does not belong to this atom"
| reposition_marks
    reposition_marks ( self )
| set_mark
    set_mark (
            self,
            mark='radical',
            angle='auto',
            draw=1,
            angle_resolution=1,
            )
sets the mark and takes care of charge and multiplicity changes; mark may be either the class or mark name
Exceptions |
--- | ---
ValueError, "not a allowed mark for this type - %s" % mark

Table of Contents

This document was automatically generated on Tue Dec 12 13:46:43 2006 by HappyDoc version 2.1