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.
9 from __future__
import print_function
26 topology = ff.create_topology(prot)
31 topology.apply_default_patches()
36 topology.add_atom_types(prot)
41 topology.add_missing_atoms(prot)
44 topology.add_coordinates(prot)
53 bonds = topology.add_bonds(prot)
54 angles = ff.create_angles(bonds)
55 dihedrals = ff.create_dihedrals(bonds)
56 impropers = topology.add_impropers(prot)
98 ff.add_well_depths(prot)
101 atoms = IMP.atom.get_by_type(prot, IMP.atom.ATOM_TYPE)
115 pair_filter.set_bonds(bonds)
116 pair_filter.set_angles(angles)
117 pair_filter.set_dihedrals(dihedrals)
118 nbl.add_pair_filter(pair_filter)
130 print(score_func.evaluate(
False))