Basic Assembler

class assemblers.basic_assembler.BasicAssembler(model, temp_dir, chimera_queue, ack_event, pid, custom_args)

An example bare minimum Assembler implementation which just opens an MRC to use as the “assembled” particle.

model

The path to the model MRC to use as the particle

temp_dir

The directory into which temporary truth volumes should be placed

chimera_queue

The multiprocessing queue that the server process is listening to

ack_event

The child process-specific acknowledgement event to subscribe to for completion notifications from the Chimera server

pid

The ID of the child process running this assembler

commands

The list of Chimera commands accrued by the Assembler during processing, to be sent to the Chimera REST server once ready

simulation

The src.simulation.tem_simulation.Simulation object responsible for feeding particles assembled here to a TEM-Simulator run

close()

Lets the Chimera server know that this Assembler is done for good

Returns: None

get_new_orientation(orientation_source)
Given a string for the orientation_source configuration option, return a new orientation for

a particle.

Parameters

orientation_source – String of either “none”, “gauss(<mu>, <sigma>)”, or “<filepath>”

Returns: [x, y, z] representing a new particle orientation

reset_temp_dir()

Resets the temp directory resources for the Assembler, i.e removes current particles created

Returns: None

set_up_tiltseries(simulation)

Implements the basic tiltseries set-up procedure, which consists of:

For number of particles (i.e 4):
  1. Make a temp truth volume

  2. Assemble particle and save truth

  3. Set up sim configs and update TEM input files

Parameters

simulation – The src.simulation.tem_simulation.Simulation object responsible for feeding particles assembled here to a TEM-Simulator run, passed in from the simulation child process running the simulation using this Assembler.