note that all children of simple_parent have default meta infos set
therefor it is not necessary to provide them for all new classes if they
don't differ
Methods
|
|
|
|
__get_children
|
__get_children ( self )
children
|
|
__get_shape_defining_points
|
__get_shape_defining_points ( self )
shape_defining_points
|
|
__init__
|
__init__ (
self,
paper,
package=None,
)
|
|
__iter__
|
__iter__ ( self )
|
|
add_atom_to
|
add_atom_to (
self,
a1,
bond_to_use=None,
pos=None,
)
adds new atom bound to atom id with bond, the position of new atom can be specified in pos or is
decided calling find_place(),
|
|
atoms_bonds
|
atoms_bonds ( self, a )
|
|
atoms_bound_to
|
atoms_bound_to ( self, a )
returns list of ids of atoms bound to atom with id = id
|
|
bbox
|
bbox ( self )
|
|
bond_between
|
bond_between (
self,
a1,
a2,
)
returns id of bond between atoms i1 and i2
|
|
check_integrity
|
check_integrity ( self )
after deleting atoms or bonds it is important to see if it's needed to divide molecule to fragments
and return them in form of list of new molecules
|
|
create_new_atom
|
create_new_atom (
self,
x,
y,
name=None,
)
|
|
delete
|
delete ( self )
|
|
delete_atom
|
delete_atom ( self, item )
remove links to atom from molecule records
|
|
delete_bond
|
delete_bond ( self, item )
|
|
delete_items
|
delete_items (
self,
items,
redraw=1,
delete_single_atom=1,
)
deletes items and also makes cleaning of orphan bonds and atoms
|
|
draw
|
draw ( self, automatic="both" )
|
|
eat_molecule
|
eat_molecule ( self, mol )
transfers everything from mol to self, now only calls feed_data
|
|
expand_groups
|
expand_groups ( self, atoms=[] )
expands all group atoms; optional atoms selects atoms to expand - all used if not present
|
|
feed_data
|
feed_data (
self,
atoms,
bonds,
connect,
)
feed data from another molecule
|
|
find_least_crowded_place_around_atom
|
find_least_crowded_place_around_atom (
self,
a,
range=10,
)
|
|
find_place
|
find_place (
self,
a,
distance,
added_order=1,
)
tries to find accurate place for next atom around atom id ,
returns x,y and list of ids of items found there for overlap, those atoms are not bound to id
|
|
flush_graph_to_file
|
flush_graph_to_file ( self, name="/home/beda/oasa/oasa/mol.graph" )
|
|
get_angle
|
get_angle (
self,
a1,
a2,
)
what is the angle between horizontal line through i1 and i1-i2 line
|
|
get_atoms_occupied_valency
|
get_atoms_occupied_valency ( self, atom )
|
|
get_connected_components
|
get_connected_components ( self )
returns the connected components of graph in a form o list of lists of vertices
|
|
get_formula_dict
|
get_formula_dict ( self )
|
|
get_geometry
|
get_geometry ( self )
returns a tuple of ((minx, miny, max, maxy), mean_bond_length)
|
|
get_package
|
get_package ( self, doc )
|
|
handle_overlap
|
handle_overlap ( self )
deletes one of overlaping atoms and updates the bonds
|
|
insert_atom
|
insert_atom ( self, at )
inserts atom to molecule without any connections
|
|
insert_bond
|
insert_bond ( self, b )
|
|
is_empty
|
is_empty ( self )
|
|
lift
|
lift ( self )
|
|
move
|
move (
self,
dx,
dy,
)
moves the whole molecule
|
|
move_bonds_between_atoms
|
move_bonds_between_atoms (
self,
a1,
a2,
)
transfers all bonds from one atom to the other; both atoms must be in self
|
|
next
|
next ( self )
|
|
read_package
|
read_package ( self, package )
|
|
redraw
|
redraw ( self, reposition_double=0 )
|
|
transform
|
transform ( self, tr )
applies given transformation to its children
|