wiki:ASTFEMmethod

Define an experiment for the new ASTFEM_RSA method

All systems to be modeled can be described with the structures defined in us_femglobal.h. Each entire experiment can be uniquely defined by 3 sets of of parameters.

The first set of parameters defines the *model* of the solutes that are sedimenting, which may or may not incur a reaction. This set of parameters is defined in the structure called "ModelSystem".

struct ModelSystem
{
  QString                               description; // a descriptor of the model (i.e., monomer-dimer, noninteracting system, etc)
  int                                   model;       // a unique integer value defining the model type above     
  vector < struct SimulationComponent > component_vector;  
  vector < struct Association >         assoc_vector;
};

struct SimulationComponent
{
  float                   vbar20;         // partial specific volume of solute at 20C
  float                   mw;             // molecular weight of solute
  float                   s;              // sedimentation coefficient of solute
  float                   D;              // diffusion coefficient of solute
  float                   sigma;          // concentration dependency parameter for sedimentation (currently not used)
  float                   delta;          // concentration dependency parameter for diffusion (currently not used)
  float                   extinction;     // default NULL, if known, extinction at 280 nm
  float                   concentration;  // value of concentration in absorbance, fluorescence intensity or fringes
  float                   f_f0;           // frictional ratio of solute
  bool                    show_conc;      // GUI control element - this variable defines if the concentration is shown
                                          // it is not shown if the value is calculated like in a reaction
  bool                    show_keq;       // some components have an equilibrium constant associated with their reaction
                                          // which may be shown in the GUI if this variable is true
  bool                    show_koff;      // some components have a k_off rate constant associated with their reaction
                                          // which may be shown in the GUI if this variable is true
  int                     show_stoich;    // if the component is part of a reaction the stoichiometry of the component
                                          // should be shown in the GUI
  vector < unsigned int > show_component; // this vector controls which component(s) are shown in a listbox in the model setup GUI
  QString                 shape;          // the Perrin function used to model this component, if defined.
  QString                 name;           // The component can have a name (monomer, tetramer, etc)
  struct mfem_initial     c0;             // The radius/concentration points for a
                                          // user-defined initial concentration grid
};

struct mfem_initial
{
  vector < double > radius;
  vector < double > concentration;
};

If a component is part of a chemical reaction, the characteristics of the reaction is defined in the structure "Association". For heteroassociations, we consider here only reactions of 3 species. This is currently a limitation, but I haven't figured out a way to generalize this.

Examples for equilibrating reactions: monomer <=> dimer, A + B <=> AB, A + A +B = A2B, momomer <=> tetramer, monomer <=> dimer <=> trimer <=> tetramer, monomer <=> dimer + unreactive monomer

(each "<=>" represents a reaction with a unique keq and k_off)

struct Association
{
  float        keq;             // Equilibrium constant for this association reaction
  float        k_off;           // kinetic off-rate for this reaction
  QString      units;           // OpticalDensity, MolecularWeight, MgPerMl,
                                // Fringes, Fluorescence
  int          component1;      // which component is associating
  int          component2;      // which component is dissociating
  int          component3;      // which component is dissociating (for
                                // heteroassoc., if -1 it means self-assoc)
  unsigned int stoichiometry1;  // stoichiometry of the first component
  unsigned int stoichiometry2;  // stoichiometry of the second component
  unsigned int stoichiometry3;  // stoichiometry of the third component
};

The second set of parameters describes the run settings of the machine, i.e., rotor speed(s), length of time, acceleration profile, etc. This is defined in the structure "SimulationParameters".

struct SimulationParameters
{
  vector < double > mesh_radius; // the radii from a user-selected mesh file
                                 // (mesh == 3)

  // Note: the radius points of c0 do not have to match the radii in the mesh
  // file. The radius values of the c0 vector will be interpolated onto
  // whatever mesh the user has selected.  however, the first and last point of
  // either the c0 or mesh_radius should match the meniscus, otherwise they
  // will be ignored or interpolated to the actual meniscus and bottom position
  // set by the user, which will take precedence.

  vector < struct SpeedProfile > speed_step;
  unsigned int simpoints;         // number of radial points desired in simulation
  unsigned int mesh;              // 0 = ASTFEM, 1 = Claverie, 2 = moving hat, 
                                  // 3 = user-selected mesh, 4 = nonuniform constant mesh
  int          moving_grid;       // Use moving or fixed time grid
  float        radial_resolution; // the radial datapoint increment/resolution of
                                  // the final data
  float        meniscus;          // meniscus position without rotor stretch
  float        bottom;            // bottom of cell position without rotor
                                  // stretch
  float        rnoise;            // random noise
  float        inoise;            // time invariant noise
  float        rinoise;           // radially invariant noise
  int          centerpiece;	  // centerpiece serial number in database
  int          rotor;		  // rotor serial number in database
  bool         band_forming;      // true for band-forming centerpieces
  float        band_volume;	  // loding volume (of lamella) in a band-forming centerpiece
};

struct SpeedProfile
{
  unsigned int duration_hours;    // how long is the experiment in hours?
  unsigned int duration_minutes;  // how long is the experiment in minutes?
  unsigned int delay_hours;       // how long do we delay before acquiring data (in hours)?
  float        delay_minutes;     // how long do we delay before acquiring data (in minutes)? 
                                  // for example, during acceleration we cannot acquire data
  unsigned int scans;             // how many scans do we acquire?
  unsigned int acceleration;      // how fast do we accelerate? The XLA allows settings up to 400 rpm/sec
  unsigned int rotorspeed;        // for each speed, we need the target speed which defines the constant 
                                  // speed portion of each SpeedProfile
  bool         acceleration_flag; // is acceleration used or not?
};

The third set of parameters defines the variables needed for the boundary conditions of the Lamm equation (meniscus and bottom) and the options needed for discretization (i.e., mesh type or optional file, number of points, synthetic noise types, etc).

Here is the proposed order of writing this stuff to a file:

Each line represents a single variable to be written/cout << to file. Maybe we should agree on a comment character as well so we can comment each variable, say:

variable_value # vbar20 (float)

Writing to a file:

ModelSystem:

{
   QString description; // a descriptor of the model (i.e., monomer-dimer, noninteracting system, etc)
   int model;           // a unique integer value defining the model type above
   
   unsigned int SimulationComponent::size();
   
   for size of vector <struct SimulationComponent> component_vector; // see below
   {
	float                 vbar20;
	float                 mw;
	float                 s;
	float                 D;
	float                 sigma;
	float                 delta;
	float                 extinction;
	float                 concentration;
	float                 f_f0;
	bool                  show_conc;
	bool                  show_keq;
	bool                  show_koff;
	int                   show_stoich;
        unsigned int          show_component.size();
        for show_component.size();
	{
	    vector <unsigned int> show_component;
        }
	QString               shape;
	QString               name;

	unsigned c0::radius.size();
	
        for c0::radius.size();
	{
		double c0::radius;
		double c0::concentration;
	}

	unsigned int assoc_vector.size();
	
        for  assoc_vector.size():
	{
		float        keq;
		float        k_off;
		QString      units;
		int          component1;
		int          component2;
		int          component3;
		unsigned int stoichiometry1;
		unsigned int stoichiometry2;
		unsigned int stoichiometry3;
	}
}

Now write the SimulationParameters and speed profiles:

{
	unsigned speed_step::size()
	
        for speed_step::size()
	{
   	   unsigned int duration_hours;
	   unsigned int duration_minutes;
	   unsigned int delay_hours;
	   float delay_minutes;
	   unsigned int scans;
	   unsigned int acceleration;
	   unsigned int rotorspeed;
	   bool         acceleration_flag;
	}

	unsigned int simpoints;
	unsigned int mesh;
	int          moving_grid;
	float        radial_resolution;
	float        meniscus;
	float        bottom;
	float        rnoise;
	float        inoise;
	float        rinoise;			
	int          centerpiece;
	int          rotor;
	bool         band_forming;
	float        band_volume;
}
Last modified 11 years ago Last modified on Feb 17, 2008 1:18:20 AM