IMP  2.0.1
The Integrative Modeling Platform
estimate_threshold_from_molecular_mass.py
1 #!/usr/bin/env python
2 
3 import IMP.em
4 import IMP.atom
5 
6 def main():
7  usage = """%prog [options] <em map>
8  <number of residues>
9 
10 Approximate the density threshold to use given the molecular mass of
11 the complex."""
12  parser = IMP.OptionParser(usage=usage, imp_module=IMP.em)
13  parser.add_option("-p", "--apix", dest="apix",
14  help="voxel size")
15  (options, args) = parser.parse_args()
16  if len(args) != 2:
17  parser.error("incorrect number of arguments")
18  in_map_fn=args[0]
19  num_res=int(args[1])
20  #read the map
21  dmap=IMP.em.read_map(in_map_fn)
22  if options.apix:
23  dmap.update_voxel_size(float(options.apix))
24 
26 
28  print "Mass",mass
29  print "approximated threshold:",t
30 
31 if __name__=="__main__":
32  main()