def _load_bond_data(self):
def read_units(unit_names):<EOL><INDENT>"""<STR_LIT>"""<EOL>tmp = {<EOL>"<STR_LIT:A>": units.angstrom,<EOL>"<STR_LIT>": units.picometer,<EOL>"<STR_LIT>": units.nanometer,<EOL>}<EOL>return [tmp[unit_name] for unit_name in unit_names]<EOL><DEDENT>def read_length(BOND_TYPE, words, col):<EOL><INDENT>"""<STR_LIT>"""<EOL>nlow = int(words[<NUM_LIT:2>])<EOL>nhigh = int(words[<NUM_LIT:3>])<EOL>for i, conversion in zip(range((len(words) - <NUM_LIT:4>) // <NUM_LIT:3>), conversions):<EOL><INDENT>word = words[col + <NUM_LIT:3> + i*<NUM_LIT:3>]<EOL>if word != '<STR_LIT>':<EOL><INDENT>self.lengths[BOND_TYPE][frozenset([nlow, nhigh])] = float(word)*conversion<EOL>return<EOL><DEDENT><DEDENT><DEDENT>with pkg_resources.resource_stream(__name__, '<STR_LIT>') as f:<EOL><INDENT>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 words[<NUM_LIT:0>] == "<STR_LIT>":<EOL><INDENT>conversions = read_units(words[<NUM_LIT:1>:])<EOL><DEDENT>else:<EOL><INDENT>read_length(BOND_SINGLE, words, <NUM_LIT:1>)<EOL>read_length(BOND_DOUBLE, words, <NUM_LIT:2>)<EOL>read_length(BOND_TRIPLE, words, <NUM_LIT:3>)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Load the bond data from the given file

           It's assumed that the uncommented lines in the data file have the
           following format:
           symbol1 symbol2 number1 number2 bond_length_single_a bond_length_double_a bond_length_triple_a bond_length_single_b bond_length_double_b bond_length_triple_b ..."
           where a, b, ... stand for different sources.