def __init__(self):
<EOL>self.atoms_by_number = {}<EOL>self.atoms_by_symbol = {}<EOL>self.max_radius = <NUM_LIT:0.0><EOL>convertors = []<EOL>names = []<EOL>from_unit = {<EOL>"<STR_LIT:u>": (lambda s: float(s)*units.unified),<EOL>"<STR_LIT>": (lambda s: float(s)*(<NUM_LIT>*units.gram)/(units.centimeter**<NUM_LIT:3>)),<EOL>"<STR_LIT>": (lambda s: float(s)),<EOL>"<STR_LIT:A>": (lambda s: float(s)*units.angstrom),<EOL>"<STR_LIT>": (lambda s: float(s)*units.picometer),<EOL>}<EOL>def append_convertor(word):<EOL><INDENT>"""<STR_LIT>"""<EOL>if word == "<STR_LIT:str>":<EOL><INDENT>convertors.append(str)<EOL><DEDENT>elif word == "<STR_LIT:int>":<EOL><INDENT>convertors.append(int)<EOL><DEDENT>elif word == "<STR_LIT:float>":<EOL><INDENT>convertors.append(float)<EOL><DEDENT>elif word == "<STR_LIT:bool>":<EOL><INDENT>convertors.append(eval)<EOL><DEDENT>else:<EOL><INDENT>convertor = from_unit.get(word)<EOL>if convertor is not None:<EOL><INDENT>convertors.append(lambda s: convertor(float(s)))<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>" % word)<EOL><DEDENT><DEDENT><DEDENT>with pkg_resources.resource_stream(__name__, '<STR_LIT>') as f:<EOL><INDENT>lines_read = <NUM_LIT:0><EOL>for line in f:<EOL><INDENT>words = line.decode('<STR_LIT:utf-8>').split()<EOL>if (len(words) > <NUM_LIT:0>) and (words[<NUM_LIT:0>][<NUM_LIT:0>] != "<STR_LIT:#>"):<EOL><INDENT>if lines_read == <NUM_LIT:0>:<EOL><INDENT>names = words<EOL><DEDENT>elif lines_read == <NUM_LIT:1>:<EOL><INDENT>for word in words:<EOL><INDENT>append_convertor(word)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>atom_info = AtomInfo()<EOL>for name, convertor, word in zip(names, convertors, words):<EOL><INDENT>if word == "<STR_LIT>":<EOL><INDENT>setattr(atom_info, name, None)<EOL><DEDENT>else:<EOL><INDENT>value = convertor(word)<EOL>setattr(atom_info, name, value)<EOL>if name.endswith("<STR_LIT>") and self.max_radius < value:<EOL><INDENT>self.max_radius = value<EOL><DEDENT><DEDENT><DEDENT>self._add_atom_info(atom_info)<EOL><DEDENT>lines_read += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT>
This object is created when importing this module. There is no need
to do it a second time manually.