Help with using Boolean modifier to subtract from a cube
The easiest solution i can think of which avoids doing many many boolean operations is to use a Metaball as dupli object instead of the Nurbs-Ball you are using. Metaballs will automatically "Stick together" and form a nice single combined volume (Which you can easily use for later boolean operations). If you go into edit mode and do the scaling of the metaball surface tension, you can get something like this:



When you are happy with the result you can select the parent object ("barium") make duplicates real (Ctrl+Shift+A), convert the metaballs to mesh ("Curve to mesh", Alt+C in Blender 2.79b) and then do a boolean operation: (for some reason you need to apply a remesh modifier and triangulate the resulting mesh for the boolean to work properly... see images)



Happy Blending! :)