#include "Simulator_frame.h"

#include "Monitor_frame.h"
#include "Arbitrary_atom_group.h"
#include "Collect_energy.h"
#include "Collect_phase_trajectory.h"
#include "Model.h"
#include "Model_kit.h"
#include "Project.h"
#include "Create.h"

namespace MM
{
Simulator_frame::
Simulator_frame () 
//:
//    model_(0)
{
}

Model & Simulator_frame::
model ()
{
    //return model_ == 0 ? Project::singleton().current_model () : *model_;
    //ENSURE ("Model exist.", model_ != 0);
    //return *model_;
    return model_;
}

void Simulator_frame::
clear_monitors ()
{
    for (int i=0;  i<monitor_count();  ++i)
        monitor(i).clear();
}

void Simulator_frame::
adopt_interaction (Interaction * new_interaction)
{
    model().kit().adopt_interaction (new_interaction);
}

void Simulator_frame::
start ()
{
    Model_kit::Lock lock (model_.kit());
    handle_start ();
}

}//MM
