In this example, a PDB file is read in and scored using the CHARMM forcefield. It is similar to the 'charmm_forcefield.py' example, but fully works through each step of the procedure using lower-level IMP classes. This is useful if you want to customize the way in which the forcefield is applied.
25 topology = ff.create_topology(prot)
30 topology.apply_default_patches()
35 topology.add_atom_types(prot)
40 topology.add_missing_atoms(prot)
43 topology.add_coordinates(prot)
52 bonds = topology.add_bonds(prot)
53 angles = ff.create_angles(bonds)
54 dihedrals = ff.create_dihedrals(bonds)
55 impropers = topology.add_impropers(prot)
99 ff.add_lennard_jones_types(prot)
102 atoms = IMP.atom.get_by_type(prot, IMP.atom.ATOM_TYPE)
116 pair_filter.set_bonds(bonds)
117 pair_filter.set_angles(angles)
118 pair_filter.set_dihedrals(dihedrals)
119 nbl.add_pair_filter(pair_filter)
131 print(score_func.evaluate(
False))