       Atracurium  Modeller

Copyright Richard Muirhead 1996, 1997.

About Atracurium Modeller

Mathematics Routines

Getting Started - Setting Your Model

Running Simulations - Intermittent Dosing

Running Simulations - Bolus Dose and Infusion

Running Simulations - Custom dosing

Running Simulations - Constant Concentration

Saving Data

Printing the graph

Test Routines

Further Reading


About Atracurium Modeller

Written throughout using Borland's Delphi and the Turbo Pascal Programmer's Library. This program is in the public domain.

Hardware / software.

As this is written in Delphi, Windows 3.1 or later required. 80386 or better, maths co-processor strongly recommended. Memory : this program has run well in 8MB. This program has been written in 640*480*16 resolution ( standard VGA ). A mouse is not essential as all options are available via the keyboard.

WARNING:

This program simulates the pharmacokinetics of atracurium within a typical adult patient.

This program is intended as an aid to teaching pharmacokinetics to trainee anaesthetists. It is not intended to connect to or control, directly or indirectly, any injection or infusion device or pump.

The user of this program is advised to ensure that the  protocol used conforms to the current dose and other recommendations as published in the Data Sheet.

The author cannot take any responsibility for maladministration of atracurium.

This program presumes that the effect of atracurium remains constant. Care should be exercised in any patient who is hypothermic or receiving volatile agents.

The author would appreciate that you register the use of this program. There is no fee for registration.

Please email : rmuirhead@compuserve.com

         RMuirh3716@aol.com

or telephone ( UK ) 01709 824550 ( ask for / leave message  for Dr. Richard Muirhead ).


Mathematics Routines

See also Test Routines

The mathematics used to derive the concentrations in The two compartment model are derived from the paired differential equations:-

d( m1 ) / dt  =  m2 * k21  -  m1 * k12  -  m1 * k10

d( m2 ) / dt  =  m1 * k12  -  m2 * k21  -  m2 * k20

Where

m1	mass in compartment 1

m2	mass in compartment 2

k10	elimination constant from compartment 1

k20 	elimination constant from compartment 2

k12	transfer constant from compartment 1 to compartment 2

k21	transfer constant from compartment 2 to compartment 1

In effect compartment models this becomes:-

d( m1 ) / dt  =  m2 * k21  -  m1 * k12  -  m1 * k10  -  m1 * k1e

d( m2 ) / dt  =  m1 * k12  -  m2 * k21  -  m2 * k20

d( me ) / dt  =  m1 * k1e  -  me * ke0

Where

me	mass in effect compartment

k1e	transfer constant form the main compartment

ke0	elimination constant from the effect compartment.

The transfer of atracurium back to the main compartment is trivial and need not be considered. The effect compartment volume is usually set very small, often 1/10000 of the main compartment.

As this model calculates concentration rather than mass, the equations become, e.g.:-

d( c1 ) / dt  =  c2 * v2 * k21 / v1  -  c1 * k12  -  c1 * k10

d( c2 ) / dt  =  c1 * v1 * k12 / v2  -  c2 * k21  -  c2 * k20

Where

c1	concentration in compartment 1 ( m1 / v1 ),

c2	concentration in compartment 2 ( m2 / v2 ).

All equations are resolved using the fourth-order Runge-Kutta algorithm with a 10 steps per minute.

Train of Four.

This routine is based on the sigmoid function ( adapted from Hull, p221 ):-

T4 = k / ( 1 + e^(Ca + b ))

where 	C 	= concentration

a,b,k	= constants

Obviously, at C=0 ( no muscle blockade applied ), k=1+e^(b)

Therefore

T4 = ( 1 + e^(b) ) / ( 1 + e^(Ca+b ) )

The train of four algorithm is applied to the deep compartment ( two compartment models ) or the effect compartment ( three compartment models ).


Getting Started

Setting your model parameters.

Three sets of parameters are hard coded :

( a ) Default ( Hull ).

These parameters are those published in Hull C. J. , British Journal of

Anaesthesia,  55, No2, Feb 1983, type A model.

This model has a train-of-four model and can be selected when the default parameters are selected or via the menu bar. The scale toggles between linear ( 0 - 100% ) and logarithmic ( 1 - 100% ).

( b ) Alternate  ( Hull ).

These parameters are those published in Hull C. J. , British Journal of  Anaesthesia, 55, No2, Feb 1983, type B model. This model also includes a train-of-four.

( c ) Marathe.

These parameters are those used by Steven Shafer in his excellent STANPUMP program, available from http://www.stanford.edu. The Marathe data set incorporates effect compartment modelling. This model also includes train-of-four.

( d ) Custom.

There is also a custom parameters setting. There is no train-of-four.

This command opens an .INI file ( defaults to WINATRAC.INI ) containing the parameters. Sample INI files are included. There is only one section:-

[custom]

There then follows entries for all the constants. All need to be specified, but an entry of 0 ( zero ) is acceptable.

v1	Main ( plasma ) compartment in litres.

v2	Second compartment in litres.

V3	Effect compartment in litres.

dose	Dose of atracurium in mg ( this setting is overridden in some simulations ).

k10

k20

k12

k21

k1e

ke0 	Rate constants in min-1

Here is a listing of the default INI file:-

[constants]

v1 =   4.620000

v2 =   3.350000

v3 =   0.000462

dose = 42.0

k10 = 0.08780000

k12 = 0.05910000

k21 = 0.08160000

k20 = 0.00000000

k1e = 0.00000740

ke0 = 0.07400000


Running Simulations - intermittent dosing.

Three basic simulations for intermittent dosing are provided:-

( a )	Single dose.

A single dose of  0.6mg/kg ( 42mg. in a 70kg patient  ).

( b )	Two doses.

A single dose of   0.6mg/kg followed by 0.3mg/kg at one hour. ( A rather bizarre dosing, but demonstrated in Hull C.J., British Journal  of  Anaesthesia, 55, No2, Feb 1983 ).

( c )	Multiple dosing.

A dose of 0.6mg/kg followed by 0.15mg/kg every 15 minutes. ( This equates to approximately 40 mg and 10 mg respectively.)

A graph of your data will be displayed. See also Saving data.


Running Simulations - bolus dose and infusion

The reason for this simulator was to explore the effects of various bolus dose and infusion protocols. The data sheet states that bolus doses of 0.3 - 0.6 mg/kg and infusion rates of  0.3 - 0.6 mg / kg.hr are appropriate. Several buttons ( or menu choices ) simulate this.

The user may also stipulate individual bolus dose or infusion protocols. Entering 0 ( zero ) for either the bolus dose or infusion rate will show the effect of an infusion or bolus dose respectively.

A graph of your data will be displayed. See also Saving data


Custom Dosing

This simulation combines both the intermittent dosing and bolus infusion modes.

The user is asked to enter the initial conditions in the form of a bolus and infusion - again a bolus or infusion of zero is acceptable.

If you choose to change the model then you may enter another infusion or bolus at a specified time. In this way, complex dosing routines can be tested.

See also Saving data


Saving Data

See also Printing the graph

After each simulation, a graph is displayed. You may save this by performing a Windows screen dump but other options are available.

Click on File | Save As...   This will prompt you to save the data in a variety of formats.

The screen can be saved as a bitmap ( PCX or BMP - change the filename extension as appropriate ). You may also save the file in a 2 data formats:-

( a )	Columnar ASCII.

This will save the file as several columns:

Time( minutes )

Concentration compartment 1

Concentration compartment 2.

Concentration compartment 3 ( effect compartment, if present ).

Train of four ( on all but custom models ).

Infusion rate ( for constant concentration model only).

A sample file could start:-

Minutes  conc1       conc2         effect     to4

     0    9.090909    0.000000    0.000000  100.00

     1    7.868208    0.661604    0.602996   60.80

     2    6.844916    1.183822    1.083190    8.85

     3    5.986846    1.591783    1.462292    1.13

     4    5.265740    1.906217    1.758247    0.22

If your application does not ignore the top line, open the file in NOTEPAD, note down the column headings and delete the top line.

( b ) 	dBase III file. Columns as above.

Most spreadsheet and database programs will load or import these files and, in most cases, is the preferred option.

I think most users will find this adequate - if not email me for a patch!


Printing the graph

See also Saving data

There are two methods for printing:-

Click on File | Print to print the graph. This uses the current printer resolution and options are available for landscape or portrait mode, the image scaling to fit the paper. This method will scale the graph to fit the printable are on the paper but will include a grid.

For better printouts, save the file as a bitmap and load into PAINTBRUSH ( Windows 3.1 ) or PAINT ( Windows 95 ) to enable editing.

Alternatively click on Copy to transfer the image to the clipboard - it may then be edited and saved or transferred to other programs via Paste. If you use copy ensure that the paste area is large enough for the graphic - in windows 3.1 paintbrush in 640*480 mode you will need to turn off the toolbar and drawing controls before pasting.


Constant Concentration

This option will  attempt to run a constant plasma concentration model. To select, enter your target plasma concentration. The graph will demonstrate the calculated concentration.

This option presumes that the initial plasma concentration is already at the target ( i.e. that for a 70kg. patient a bolus dose of 11.2mg will distribute in 2.8l to give a concentration of 4mg/l ). The data files will then give the infusion rate required to maintain that plasma concentration. These figures are intended to illustrate the principle of target concentration infusion and are not intended to be used clinically.

See also Saving data


Test Routines

See also Mathematics Routines

Various routines have been included to illustrate the accuracy of the mathematics. On a theoretical note, no routine exists that can give a perfectly accurate result, but it is possible to get a very close approximation.

Routines are shown to calculate e and 1/e by approximate integration using both Euler's technique ( widespread in this type of software ) and the fourth-order Runge-Kutta ( used in all simulations in this program except the test routines ).

Routines also calculate the terminal concentration in a two compartment model using both simultaneous differential equations and the equation:-

C  =  A * e^( -alpha*t)    +    B * e^( -beta*t)

From the above equation the volumes and rate  constants can be derived:-

v1    =  Xd / ( A + B )                                                { Xd is the initial concentration }

k21  =  ( A * beta  +  B * alpha ) / ( A + B )

k10  =  alpha * beta / k21

k12  =  alpha  +  beta  -  k10  - k21

v2   =   v1  *  k12 / k21

Testing may thus be carried out by calculating the main compartment concentration at time t using both methods.


Further reading.

For the model data used:-

Hull C. J. A Model for Atracurium. British Journal of Anaesthesia, 55, No2, Feb 1983.( A prize to the first person to find all the errors in this paper! )

Marathe P.H., Dwersteg J.F., Pavlin E.G. et al. Effect of thermal injury on the pharmacokinetics of Atracurium in humans. Anaesthesiology 1989; 70; 752-755.

For the use of numerical methods in pharmacokinetics:-

Hull C. J. Pharmacokinetics in Anaesthesia, Butterworth-Heinemann,

ISBN 0 7506 1420 X.

For the mathematics of  simultaneous differential equations and appropriate software solutions:-

Press W.H., Flannery B.P., Teukolsky S.A., Vettering W.T.,

Numerical Recipes in Pascal - The Art of Scientific Computing.

Cambridge University Press.

ISBN 0-521-37516-9.

( This book is also available in FORTRAN and C ).