from nose.tools import assert_equal, assert_true, assert_false import logging from rmgpy.molecule.element import PeriodicSystem from rmgpy.molecule.atomtype import atomTypes from rmgpy.molecule.atomtypedatabase import create_atom_types import itertools import unittest from external.wip import work_in_progress from rmgpy.molecule.molecule import Molecule from rmgpy.molecule.group import Group molecule_atom_types = ['C', 'O', 'N', 'S', 'Si', 'Cl', 'I', 'F'] group_atomtypes = {} for item in create_atom_types(): group_atomtypes[item.label] = item def get_multiplicity(unpaired_electrons): ''' 2*s + 1, with s = 1/2 = unpaired electrons + 1 ''' return unpaired_electrons + 1 def get_lone_pairs(atom_type): if atom_type in group_atomtypes: return group_atomtypes[atom_type].lp #
from nose.tools import assert_equal, assert_true, assert_false import logging from rmgpy.molecule.element import PeriodicSystem from rmgpy.molecule.atomtype import atomTypes from rmgpy.molecule.atomtypedatabase import create_atom_types import itertools import unittest from external.wip import work_in_progress from rmgpy.molecule.molecule import Molecule from rmgpy.molecule.group import Group molecule_atom_types = [ 'C', 'O', 'N', 'S', 'Si', 'Cl', 'I', 'F'] group_atomtypes = {} for item in create_atom_types() : group_atomtypes[item.label] = item def get_multiplicity(unpaired_electrons): ''' 2*s + 1, with s = 1/2 = unpaired electrons + 1 ''' return unpaired_electrons+1 def get_lone_pairs(atom_type): if atom_type in group_atomtypes: return group_atomtypes[atom_type].lp# return PeriodicSystem.lone_pairs[atom_type]