Hi Christian,

Thanks for letting me know about this over-use of memory in phenix CombineFocusedMap that crashed your computer!.  I found the problem and fixed it today, so starting with tomorrow's Phenix nightly build which will appear here when ready:

  https://phenix-online.org/download/phenix/nightly/?version=dev-5550

the CombineFocusedMap tool should work with large models and large maps, even if rigid-body refinement is done on each chain with the keyword rigid_body_refinement_single_unit=False (as is default).  

Let me know if this does not do it!
All the best,
Tom T


On Tue, Dec 17, 2024 at 2:24 PM Christian Steinmetzger <christian.steinmetzger@imbim.uu.se> wrote:
Hi Tom,

I trimmed the maps down from it's original size of 576 x 576 x 576 to 297 x 322 x 355 using "phenix.map_box model.cif map1.mrc "

and then submitted the resulting output model_box.cif, map1_box.ccp4 and map2_box.ccp4 to combine_focused_maps, but still got the same memory issue on the rigid-body refinement step. I monitored the job for a while and the python process had reached more than 90 GB memory use when I checked. My workstation has 128 GB RAM in total. I'm sending the full terminal output of the job below.

Nigel, I also encountered another issue with using elbow for restraint generation. For 4OC and UR3, the command phenix.elbow --chemical_component="$RES" --final_geometry="$RES" doesn't produce a cif file because it encounters an unusually long P-O bond in the phosphate group, ~150 or 182 Å respectively. A pdb file is still saved and there atom OP3 is clearly in a very odd position.

------------------------------------------------------------------------------------------------
Here is the terminal output from combine_focused_maps:

Starting job
===============================================================================
Validating inputs

************************************************************
          PHENIX combine_focused_maps  Tue Dec 17 18:27:58 2024
************************************************************

Working directory:  /home/csteinmetzger/workdir/maps_composite

PHENIX VERSION:  dev-5533


Reading input data

Removed 1 residues with missing CA/P atoms
Model with 10208 residues read from /home/csteinmetzger/workdir/model_box.cif

Map file read from /home/csteinmetzger/workdir/map1_box.ccp4
header_min:  -0.215969517827
header_max:  0.890450239182
header_mean: 0.00580687774345
header_rms:  0.0463103465736

Information about FULL UNIT CELL:
unit cell grid: (576, 576, 576)
unit cell parameters: (436.32000732421875, 436.32000732421875, 436.32000732421875, 90.0, 90.0, 90.0)
space group number:   1

Information about the PART OF MAP THAT IS PRESENT:
map cell grid: (297, 322, 355)
map cell parameters: (224.9775037765503, 243.91500409444174, 268.9125045140584, 90.0, 90.0, 90.0)
map origin: (131, 125, 110)
pixel size: (0.7575, 0.7575, 0.7575)
Shift (grid units) to place origin at original position: (0, 0, 0)
Wrapping (using unit_cell_translations to get map values) allowed: False



Map file read from /home/csteinmetzger/workdir/map2_box.ccp4
header_min:  -0.172103002667
header_max:  0.68276655674
header_mean: 0.0004433694412
header_rms:  0.0258353501558

Information about FULL UNIT CELL:
unit cell grid: (576, 576, 576)
unit cell parameters: (436.32000732421875, 436.32000732421875, 436.32000732421875, 90.0, 90.0, 90.0)
space group number:   1

Information about the PART OF MAP THAT IS PRESENT:
map cell grid: (297, 322, 355)
map cell parameters: (224.9775037765503, 243.91500409444174, 268.9125045140584, 90.0, 90.0, 90.0)
map origin: (131, 125, 110)
pixel size: (0.7575, 0.7575, 0.7575)
Shift (grid units) to place origin at original position: (0, 0, 0)
Wrapping (using unit_cell_translations to get map values) allowed: False



Input maps and matching models:

Map 1:   /home/csteinmetzger/workdir/map1_box.ccp4
Model 1: /home/csteinmetzger/workdir/model_box.cif

Map 2:   /home/csteinmetzger/workdir/map2_box.ccp4
Model 2: /home/csteinmetzger/workdir/model_box.cif

Normalizing maps (mean=0 sd=1) before use

Running rigid body refinement on each model and map
Refining each chain of a molecule as a single unit
Refining model 1 with rigid_body refinement
Killed
_______________________________________________
phenixbb mailing list -- phenixbb@phenix-online.org
To unsubscribe send an email to phenixbb-leave@phenix-online.org
Unsubscribe: phenixbb-leave@%(host_name)s


--
Thomas C Terwilliger
Laboratory Fellow, Los Alamos National Laboratory
Senior Scientist, New Mexico Consortium
100 Entrada Dr, Los Alamos, NM 87544
Tel: 505-431-0010