def setup_hydrocarbon_ff(graph):
<EOL>bond_params = {<EOL>(<NUM_LIT:6>, <NUM_LIT:1>): <NUM_LIT>*kcalmol/angstrom**<NUM_LIT:2>,<EOL>(<NUM_LIT:6>, <NUM_LIT:6>): <NUM_LIT>*kcalmol/angstrom**<NUM_LIT:2>,<EOL>}<EOL>for key, val in list(bond_params.items()):<EOL><INDENT>if key[<NUM_LIT:0>] != key[<NUM_LIT:1>]:<EOL><INDENT>bond_params[(key[<NUM_LIT:1>], key[<NUM_LIT:0>])] = val<EOL><DEDENT><DEDENT>bend_params = {<EOL>(<NUM_LIT:1>, <NUM_LIT:6>, <NUM_LIT:1>): <NUM_LIT>*kcalmol/rad**<NUM_LIT:2>,<EOL>(<NUM_LIT:1>, <NUM_LIT:6>, <NUM_LIT:6>): <NUM_LIT:30>*kcalmol/rad**<NUM_LIT:2>,<EOL>(<NUM_LIT:6>, <NUM_LIT:6>, <NUM_LIT:6>): <NUM_LIT>*kcalmol/rad**<NUM_LIT:2>,<EOL>}<EOL>for key, val in list(bend_params.items()):<EOL><INDENT>if key[<NUM_LIT:0>] != key[<NUM_LIT:2>]:<EOL><INDENT>bend_params[(key[<NUM_LIT:2>], key[<NUM_LIT:1>], key[<NUM_LIT:0>])] = val<EOL><DEDENT><DEDENT>terms = []<EOL>for i0, i1 in graph.edges:<EOL><INDENT>K = bond_params[(graph.numbers[i0], graph.numbers[i1])]<EOL>terms.append(BondStretchTerm(K, i0, i1))<EOL><DEDENT>for i1 in range(graph.num_vertices):<EOL><INDENT>n = list(graph.neighbors[i1])<EOL>for index, i0 in enumerate(n):<EOL><INDENT>for i2 in n[:index]:<EOL><INDENT>K = bend_params[(graph.numbers[i0], graph.numbers[i1], graph.numbers[i2])]<EOL>terms.append(BendAngleTerm(K, i0, i1, i2))<EOL><DEDENT><DEDENT><DEDENT>return ForceField(terms)<EOL>
Create a simple ForceField object for hydrocarbons based on the graph.