IMP
2.0.1
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
resample_density.py
1
#!/usr/bin/env python
2
3
import
IMP.em
4
5
def
main():
6
IMP.base.set_log_level
(IMP.base.SILENT)
7
usage =
"""%prog [options] <em map> <resample level 2/3/4...>
8
<output: resample_density.mrc>
9
10
Resample a density map."""
11
parser =
IMP.OptionParser
(usage=usage, imp_module=
IMP.em
)
12
(options, args) = parser.parse_args()
13
if
len(args) != 3:
14
parser.error(
"incorrect number of arguments"
)
15
in_map_fn=args[0]
16
resample_level=int(args[1])
17
output_map_fn=args[2]
18
#read the protein
19
dmap=
IMP.em.read_map
(in_map_fn)
20
r_dmap =
IMP.em.get_resampled
(dmap,resample_level)
21
IMP.em.write_map
(r_dmap,output_map_fn,
IMP.em.MRCReaderWriter
())
22
23
if
__name__ ==
"__main__"
:
24
main()