Scripts: savemaskedmaps.py

File savemaskedmaps.py, 451 bytes (added by goddard, 13 years ago)
Line 
1# Save masked maps, overwriting original map files.
2#
3# Looks for open models with names ending in "masked" and saves those
4# using the path of like named models without the "masked" suffix.
5#
6from chimera import openModels as om, runCommand
7mlist = om.list()
8for mv in mlist:
9 if mv.name.endswith(' masked'):
10 v = [m for m in mlist if mv.name == m.name + ' masked'][0]
11 runCommand('volume %s save %s' % (mv.oslIdent(), v.data.path))