2 """This script shows how to create DENSITY representations.
3 and set up the Gaussian EM restraint.
5 These representations are useful when you are doing EM fitting with
8 Preliminary step: you should convert your EM map to a GMM file
9 with the command line utility create_gmm.py
10 (located in isd/pyext/src/create_gmm.py):
11 python create_gmm.py emd_1883.mrc 50 emd_1883.gmm50.txt -m emd_1883.gmm50.mrc
27 print(
"To run this example, please first install the 'sklearn'")
28 print(
"Python module.")
41 mol = st.create_molecule(
"Rpn4", sequence=seqs[
"1WCM:D"], chain_id=
"D")
42 atomic_res = mol.add_structure(
49 mol.add_representation(
53 density_residues_per_component=10,
55 density_prefix=
"Rpn4_gmm",
57 density_force_compute=
False,
60 density_voxel_size=3.0)
64 mol.add_representation(mol.get_non_atomic_residues(),
67 setup_particles_as_densities=
True)
79 hier, representation_type=IMP.atom.DENSITIES).get_selected_particles()
87 scale_target_to_mass=
False,
89 target_mass_scale=100000,
93 output_objects.append(emr)