Qual: Difference between revisions

From bradwiki
Jump to navigation Jump to search
m (Changed protection level for "Qual" (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite) ‎[read=sysop] (indefinite)) [cascading])
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{QualHeader}}
Qual Paper SI Material


===Qualifying Paper===
{{Box|font=150%|width=50%|float=left|text=14px|boarder=solid #aaa 1px|Qual Project Source Code|[[File:Github2.png|left|100px]] All source code used in my qualifying exam project can be found [https://github.com/subroutines/djhbrm here in my github repo for the project]. An online version of my qual with enhanced features like citation data popup graphics and animations can be found on [[:Category:Synaptic Plasticity|this page]]}}


===A New Theoretical Framework of LTP Molecular Plasticity===
{{Clear}}




===Bradley R. Monk===
==SI Fig. 1 - Actin Filament Surface Hull==
;Molecular Cognition Laboratory, Department of Psychology
;University of California, San Diego


<html><iframe width="560" height="315" src="//www.youtube.com/embed/JH-hGjzhEFQ" frameborder="0" allowfullscreen></iframe></html>




==INTRODUCTION==


Neural Correlates of Memory
==SI Fig. 2 - Brownian Motion Matlab Code==
Memory formation and its physical substrates have been studied for more than a century  . Early seminal contributions by Cajal and Hebb (seriatim: Neuron Doctrine  and Hebbian Plasticity ) provided a basic framework for understanding this process: memories are formed by modulating the strength of synaptic connections between neurons. This type of experience-dependent neural network reorganization has now been detailed by countless studies on synaptic potentiation  .


Potentiation-based descriptions of learning and memory
{{ExpandBox|width=80%|float=left|opener=View|Brownian Motion Matlab Code|


<syntaxhighlight lang="matlab" line start="1" highlight="1" enclose="div">
function [boom] = BradsBrownianMotionScript()
format compact;
format short;
close all;


Memory: Drawing Parallels Between Learned Behavior and Physical Substrates
% Note: This matlab script requires 'msdanalyzer' toolbox
* The first attempts to identify neuronal changes that underlie learning and memory used simple forms of procedural memory such as habituation, sensitization, and classical conditioning.
%-------------############################------------------%
* Model systems: simple organisms, reflex*type memory, synaptic observations
%                STARTING PARAMETERS
* Aplysia (diagram)
%-------------############################------------------%
* electrophysiology: the gold standard technique, action potentials
D = .3;                    % Diffusion Rate
* short term and long term potentiation, presynaptic and postsynaptic changes
Ds = .1;                    % Diffusion Scalar (Ds = Dn)
* local fluctuations in neurotransmitters, receptors, and molecular cascades
Dn = D/(D/Ds);              % new D after scaling L
* Associative and non*associative memory phenomena
d = 2;                      % dimensions
dT = 1;                    % time step
k = sqrt(d*D);             % stdev of D's step size distribution
MSD = 2*d*D;                % mean squared displacement
L = sqrt(2*d*D);            % average diagonal (2D) step size
Lx = L/sqrt(2);            % average linear (1D) step size
Ls = 1/sqrt(D/Ds);          % scales Lx values for Dn


Declarative memory system and the [[Hippocampus]]
* what studying the [[hippocampus]] has told us about [[LTP]] and STP and how they can be presynaptic or postsynaptic mechanisms depending on the pathway
* stimulation and spike train intensity evoke different types of plasticity
* Introduce NMDA as it parallels associative learning


Synaptic and Molecular Mechanisms of Learning
MSDtest = [1 0 0]; % test: D, Dn, or L
* Presynaptic molecules, from Aplysia and Drosophila studies
Scale = 1/10; % scale of model
* Calcium, glutamate
Ndots = 100;
* [[cAMP]], [[PKA]], CREB
Nsteps = Ndots;
* Postsynaptic molecules
* [[AMPAR]], [[cAMP]], Ca, [[CaMKII]], PKC, MAPK, CREB


Long Term Memory
* CREB
* Neurite Growth and the tag for local translation of mRNA
* CPEB, PKMzeta, memory maintenance


Neural Network Properties
xyl = ones(2,Ndots);
* sparse neural networks, memory engram
xyds = ones(2,Ndots);
* multiple forms of plasticity are required for [[LTP]] to last
lims = ((D+1)^2)*10;
* one neuron in multiple memories
* the main challenge in building models of long*lasting memory, especially in cases where new experiences are continually generating new memories, is protecting the memory trace from the ravages of ongoing activity, not from the ravages of time.


A Unified Model of Memory
* review presynaptic and postsynaptic mechanisms
* highlight the necessity for neurons to maintain a specific memory trace, while being involved with multiple memories and thus different patterns of network activation through the potentiation of different synapses
* current models of memory maintenance (pitfalls)
* single particle tracking studies
* scaffolding molecules, the PSD, and receptor diffusion
* energy efficiency, the pool of [[AMPAR]]
* glutamate evoked [[AMPAR]] internalization, scaffold associated proteins, diffusion to the ‘hottest’ synapse, synapse/PSD circumference changes
* mathematical simulations


Conclusion
%===========================================================%
%              LIVE PARTICLE DIFFUSION
%-----------------------------------------------------------%
for t = 1:Nsteps


    xyds = STEPxyds(Ndots, k);
[xyl] = AMPARSTEP(Ndots, xyds, xyl);
MAINPLOT(xyl, lims);


end
%===========================================================%


==SYNAPTIC CHANGES WITH LEARNING==


Procedural Memory in Simple Systems
%===========================================================%
The first attempts to identify neuronal changes that underlie learning and memory used simple forms of procedural memory such as habituation, sensitization, and classical conditioning. Several useful model systems emerged to study these phenomena including the flexion reflex of cats the eye-blink response of rabbits and a variety of reflex behaviors in invertebrate systems, including the gill-withdrawal reflex of Aplysia (Spencer et al. 1966; Thompson et al. 1983; Kandel and Tauc 1963). These preparations were chosen for the limited number of neurons (or neuronal types) that participated in the behavior. This reductionist approach allowed the specific circuitry that controlled the behavior to be defined and examined for modification following learning. The studies were aimed at pinpointing the sites within a neural circuit that are modified by learning and used for memory storage, and for identifying the cellular basis for those changes.
%              MSD RANDOM STEPS ANALYSIS
%-----------------------------------------------------------%
tracks = cell(Ndots, 1);


By allowing electrophysiological recording from individual neurons that are readily identifiable from animal to animal and that form part of a simple behavioral circuit, these systems provided the first experimental insight into the cellular mechanisms of memory. One mechanism for learning and short-term memory, evident in both the gill-withdrawal reflex of Aplysia and in the tail-flick response of crayfish, is a change in synaptic strength brought about by modulating the release of transmitter. A decrease in transmitter release is associated with short-term habituation, whereas an increase in transmitter release occurs during short-term sensitization (Castellucci et al. 1970, 1974, 1976; Zucker et al. 1971; for early reviews, see Kandel 1976; Carewand Sahley 1986). The plasticity occurred at the sensory neuron inputs onto the motor neurons that control the reflex response and thus directly modulate its magnitude. These studies provided the first evidence for the idea that behavioral memory is mediated by plasticity in the synaptic connections between neurons that participate in the behavior.
stepN = 1;
for t = 1:Nsteps


xyds = STEPxyds(Ndots, k);
[xyl] = AMPARSTEP(Ndots, xyds, xyl);
    [tracks] = MSDfun(stepN, Nsteps, tracks, xyds);


Cell biological studies of the connections between the sensory and motor neurons of the gill-withdrawal reflex in Aplysia revealed a biochemical mechanism for the short-term increase in transmitter release produced by sensitization (Fig. 1) (Kandel 2001). A single noxious (sensitizing) stimulus to the tail leads to the activation of three known classes of modulatory neurons. The most important releases serotonin, which acts to increase the level of [[cAMP]] in the sensory neurons. This in turn activates the [[cAMP]]-dependent protein kinase ([[PKA]]), which enhances synaptic transmission. Injecting [[cAMP]] or the catalytic subunit of [[PKA]] directly into the sensory neurons is sufficient to enhance learning-related transmitter release (Brunelli et al. 1976; Castellucci et al. 1976). Studies of the gill-withdrawal reflex also revealed that even elementary forms of learning have distinct short- and long-term stages of memory storage. Whereas one training trial gives rise to a short-term memory lasting minutes, repeated spaced training gives rise to long term memory lasting days to weeks (Carewet al. 1972; Pinsker et al. 1973). These behavioral stages have a parallel in the stages of the underlying synaptic plasticity—a short-term form lasting minutes to hours and a long-term form lasting days to weeks (Carew et al. 1972; Castellucci et al. 1978). In addition to the immediate and short-term changes in synaptic function with learning, profound structural changes accompany the storage of long-term memory in both habituation and sensitization of the gill-withdrawal reflex. The sensory neurons from habituated animals retract some of their presynaptic terminals so that they make fewer connections with motor neurons and interneurons than do sensory neurons from control animals (Bailey and Chen 1983, 1988a). In contrast, following long-term sensitization the number of presynaptic terminals of the sensory neurons increases more than twofold (Bailey and Chen 1983, 1988a). This learning-induced synaptic growth is not limited to sensory neurons. The dendrites of the postsynaptic motor neurons also grow and remodel to accommodate the additional sensory input (Bailey and Chen 1988b). These results show that clear structural changes in both the pre- and postsynaptic cells can accompany even elementary forms of learning and memory in Aplysia and serve to increase or decrease the total number of functional synaptic connections critically involved in the behavioral modification.
stepN = stepN+1;
end
MSDfunction(tracks,Ndots,Nsteps,D,Dn,L,dT,k,Scale,MSDtest);




Together, these early cellular studies of simple behaviors provided direct evidence supporting Ramon y Cajal’s suggestion that synaptic connections between neurons are not immutable but can be modified by learning, and that those anatomical modifications serve as elementary components of memory storage (Bailey and Kandel 1993). In the gill-withdrawal reflex, changes in synaptic strength occurred not only in the connections between sensory neurons and their motor cells but also in the connections between the sensory neurons and the interneurons (Hawkins et al. 1981; Frost and Kandel 1995). Thus, memory storage, even for elementary procedural memories, is distributed among multiple sites. The studies showed further that a single synaptic connection is capable of being modified in opposite ways by different forms of learning, and for different periods of time ranging from minutes to weeks for different stages of memory.
Studies of memory in invertebrates also delineated a family of psychological concepts (Hawkins and Kandel 1984) paralleling those first described in vertebrates by the classical behaviorists (Pavlov and Thorndike) and their modern counterparts (Kamin, Rescorla, and Wagner). These concepts include the distinction between various forms of associative and nonassociative learning and the insight that contingency— that the conditioned stimulus (CS), in associative learning, is predictive of the unconditional stimulus (US)—is more critical for learning than mere contiguity; this is the CS that must precede the US by a short interval of time (see, for example, Rescorla and Wagner 1972). Such psychological concepts, which had been inferred from purely behavioral studies, could be explained in terms of their underlying cellular and molecular mechanisms. For example, the finding that the same sensory-to motor neuron synapses that mediate the gill withdrawal reflex are the cellular substrates of learning and memory illustrates that procedural memory storage does not depend on specialized, superimposed memory neurons whose only function is to store rather than process information. Rather, the capability for simple procedural memory storage is built into the neural architecture of the reflex pathway (Castellucci and Kandel 1976).


===Declarative Memory and the Hippocampus ===
In the mammalian [[brain]] two major early threads of research were critical in moving the study of memory forward to the point that the question of cellular and synaptic mechanisms could begin to be addressed. The first thread was anatomical and revealed a remarkable localization of memory function in the mammalian [[brain]]. Studies of patients with damage to the medial temporal lobes revealed that there are two major memory systems in the [[brain]]: declarative (explicit) and procedural (implicit or nondeclarative). Declarative memory, a memory for facts and events—for people, places, and objects— requires the medial temporal lobe and in particular the [[hippocampus]] (Scoville and Milner 1957; Squire 1992; Schacter and Tulving 1994). In contrast, procedural memory, a memory for perceptual and motor skills also evident in invertebrate animals, involves a number of [[brain]] systems depending on the specific type of learning and in the most elementary instances uses simple reflex pathways themselves, as discussed above for simple systems. Although these seminal studies identified important classifications of memory and helped to solidify the notion of functional localization at a broad anatomical level, they did not provide insight into the mechanisms acting at the finer level of the individual neuron or synapse. This next step forward was made in rodent studies, in which the [[hippocampus]] plays a similar role in declarative types of memory, such as memory for place.
In 1971 recordings of single unit firing in the [[hippocampus]] of awake, freely moving rats revealed that neurons in the [[hippocampus]] register information not about a single sensory modality—sight, sound, touch, or pain—but about the space surrounding the animal, a feat that depends on information from several senses (O’Keefe and Dostrovsky 1971). These cells, referred to as “place cells,” fire selectively when an animal enters a particular area of the spatial environment. Based on these findings, O’Keefe and Nadel (1978) suggested that the [[hippocampus]] contains a cognitive map of the external environment that the animal uses to navigate. These studies helped to define the role of the [[hippocampus]] in declarative memory as a multimodal integrator and mapmaker. Although spatial location is a strong component of this hippocampal map, the human lesion studies and work from Howard Eichenbaum in rodents suggest that it may be a more general integrator of memory-specific associations (Squire and Stark 2004)




Nearly contemporaneous with the discovery of place cells, the synaptic responses in the [[hippocampus]] were found to display plasticity with several features advantageous for memory storage (Bliss and Lømo 1973). Stimulation with a high-frequency train of action potentials was shown to produce a prolonged strengthening of synaptic transmission in all three of the major hippocampal pathways. This long-term potentiation ([[LTP]]), which is discussed in detail in the article by Lu¨scher andMalenka (2012) in this collection, has several forms that differ in molecular mechanism and duration (Fig. 2). In both the perforant path synapses from entorhinal cortex to dentate gyrus and Schaffer collateral synapses from CA3 to CA1 pyramidal neurons, [[LTP]] follows learning rules first postulated by Hebb. It requires that presynaptic activity be closely followed by postsynaptic activity. In the mossy fiber pathway, [[LTP]] does not follow Hebb’s rules; it requires only presynaptic activity with no coincident postsynaptic activity (Bliss and Collingridge 1993).
%===========================================================%
%              MSD UNIFORM STEPS ANALYSIS
%-----------------------------------------------------------%
stepN = 1;
for t = 1:Nsteps


xyds = stepsize(Ndots, Lx);
[xyl xyds] = MSDAMPARSTEP(Ndots, xyds, xyl, Ls);
    [tracks] = MSDfun(stepN, Nsteps, tracks, xyds);


The Hebbian form of [[LTP]] has been the focus of intense interest as it became clear that it possessed many other features useful for a synaptic mechanism for certain forms of learning. These critical features of [[LTP]] are synapse specificity, cooperativity, and associativity. [[LTP]] is synapse specific in that it is only induced at synapses that are activated by the tetanic stimulation; neighboring synapses that are not active do not undergo potentiation. [[LTP]] is cooperative because multiple inputs must be activated simultaneously to produce sufficient postsynaptic depolarization to induce [[LTP]]. Finally, [[LTP]] is associative because when a weak input that is normally insufficient to induce [[LTP]] is paired with a strong input, the weak input will now become potentiated. These features can largely be explained by the behavior of theN-methyl-Daspartate (NMDA)-type glutamate receptor, whose activation is critical for the induction of the Hebbian form of [[LTP]] (see Lu¨scher and Malenka 2012). Unlike most neurotransmitter receptors that respond simply to the presence or absence of their cognate transmitter in the synaptic cleft, the NMDA receptor is also sensitive to the state of the postsynaptic membrane in which it resides. Under normal resting conditions a Mg2+ ion present in the NMDA receptor pore blocks ion flux. However, this Mg2+ blockade can be relieved by depolarization of the postsynaptic membrane, which expels the blocking ion through electrostatic repulsion. Thus, NMDA receptors are only active when there is both glutamate present because of presynaptic activity and the postsynaptic neuron is substantially depolarized. [[LTP]] is therefore produced only at synapses from a given presynaptic neuron that are active (leading to glutamate release) and impinge on a postsynaptic neuron that receives sufficient concurrently active inputs (associativity and cooperativity) to produce enough depolarization to relieve Mg2fl blockade of the NMDA receptor. As a result, [[LTP]] conforms to the type of learning rule Hebb suggested: “When an axon of cell A is near enough to excite cell B and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A’s efficiency, as one of the cells firing B, is increased.”
stepN = stepN+1;
end
MSDfunction(tracks,Ndots,Nsteps,D,Dn,L,dT,k,Scale,MSDtest);




Activation of NMDA receptors produces an influx of postsynaptic Ca2+ that is critical to the induction of [[LTP]] (Lynch et al. 1983; Malenka et al. 1988). In addition to [[LTP]], which is routinely induced at hippocampal synapses by brief high-frequency (100-Hz) stimuli, hippocampal synapses also show a form of long-lasting synaptic depression, or LTD, with prolonged lowfrequency stimulation. Surprisingly, this form of plasticity also requires activation of NMDA receptors and postsynaptic Ca2+. The direction of the synaptic change likely depends on the magnitude and dynamics of the postsynaptic Ca2+ signal, as well as on the current state of the synapse, for example, whether it has been recently potentiated.
boom = 'done';
%-------------############################------------------%
end %        ##    END MAIN FUNCTION  ##
%-------------############################------------------%
%%




[[LTP]] and LTD were identified and have been studied primarily using artificial electrical stimulation that activates large numbers of fibers in a manner that is unlikely to occur naturally. The discovery of a spike-time-dependent form of synaptic plasticity (STDP) (Markram et al. 1997;Magee and Johnston 1997) was an important advance in providing a physiologically plausible manipulation that induced synaptic plasticity. In STDP a synapse becomes potentiated if a postsynaptic spike follows presynaptic release, whereas the synapse becomes depressed if the postsynaptic spike precedes release. The plasticity occurs within a tight time window such that release and spike activity offset by more than 40 ms produce no synaptic change. STDP is also NMDA receptor dependent and is likely to incorporate some of the molecular mechanisms of [[LTP]] and LTD studied using less physiological stimuli, although there are clearly some important differences, as we shall see below.
Although the properties of NMDA-dependent synaptic plasticity are intriguing and provide a straightforward cellular mechanism for forming learned associations, it has been significantly more difficult to provide direct experimental links between [[LTP]] and behavior. In 1986 pharmacological studies made the first connection of [[LTP]] to spatial memory by showing that NMDA receptors must be activated to form this type of memory in the rat. When NMDA receptors are blocked pharmacologically, not only is [[LTP]] blocked, but the animal can no longer form spatial memories that are dependent on the [[hippocampus]]. This was shown using the Morris water maze, in which an animal must integrate multiple visual cues to form a spatial memory of the location of a platform submerged below the surface of a water bath (Morris et al. 1986). Importantly, blockade of the NMDA receptors does not impair the ability of an animal to learn to swim to the platform when it is visible, a task that does not require the [[hippocampus]].




Similarly, the pharmacological blockade of NMDA receptors has been found to alter the stability of the place fields of hippocampal place cells (Kentros et al. 1998). When animals are placed in the same environment two days in a row, they activate substantially the same ensemble of hippocampal place cells whose place fields are similar in position and size on each day. This is consistent with the idea that these cells encode a stable map of the environment. However, if an NMDA blocker is administered during the formation of this place map, then the place-cellfiring pattern is not stable over 24 h.
These results provide a causal link between NMDA receptor function, long-term place cell stability, and long-term spatial memory. It is tempting to think that these effects are linked by a causal requirement for [[LTP]] or LTD in these processes; however, a number of caveats should be kept in mind. For example, certain genetic manipulations that disrupt hippocampal [[LTP]] do not impair forms of memory believed to require the [[hippocampus]] (e.g., Zamanillo et al. 1999). Conversely, manipulations that do not alter hippocampal [[LTP]] can disrupt spatial learning (Shimshek et al. 2006).
One of the most difficult problems in linking synaptic plasticity mechanisms to behavior in declarative memory is the sparse and distributed nature of the circuits. How the various neural representations of the environment are modified with learning, the location of the critical sites of plasticity, and how these modified circuits are recruited to alter motor behavior in a memory test are still largely unclear. This makes interpreting the effects of a single type of pharmacological manipulation quite difficult. One approach that has been taken in both simple and complex models is to apply molecular and genetic approaches to provide a richer understanding of the underlying mechanisms of plasticity and to use the tools generated to probe the links to behavior.


%%
%-------------############################------------------%
%            ##      SUBFUNCTIONS      ##
%-------------############################------------------%


===SYNAPTICANDMOLECULAR MECHANISMS OF PLASTICITY AND LEARNING===


====Procedural Memory in Invertebrates====
%-------------------------------------------%
Molecular biology revealed a remarkable conservation of mechanism underlying short-term memory among different animals. In 1974 Seymour Benzer and his students discovered that Drosophila can learn fear and that mutations in single genes interfere with short-term memory. Flies with such mutations do not respond to classical conditioning of fear or to sensitization, suggesting that the two types of learning have some genes in common (Quinn et al. 1974; Dudai et al. 1976). Identification of the causal mutations in the fly revealed that they represented one or another component of the [[cAMP]] pathway, the same pathway underlying sensitization and classical conditioning in Aplysia (Byers et al. 1981). These early studies that pointed to the central role of [[cAMP]] signaling examined short-term memory lasting only a few minutes. The next step was to ask how the short-term changes become stabilized to last days or years.
% STEP SIZE GENERATOR
The first clue to how short-term memory is switched to long-term memory came when Louis Flexner observed that the formation of long-term memory requires the synthesis of new proteins (Flexner et al. 1963). Subsequent work in Aplysia (Dash et al. 1990; Bacskai et al. 1993; Martin et al. 1997; Alberini et al. 1994; Hegde et al. 1997; for review, see Kandel 2001) and Drosophila (Dudai et al. 1976; Duerr and Quinn 1982; Drain et al. 1991; for review, see Waddell and Quinn 2001) showed that with repeated training [[PKA]] moves from the synapse to the nucleus of the cell, where it activates the transcription factor [[cAMP]] response element binding protein-1 (CREB-1). CREB-1 acts on downstream genes to activate the synthesis of protein and stimulate the growth of new synaptic connections.
%-------------------------------------------%
Further studies in Aplysia and in the fly revealed the surprising finding that the switch to long-term synaptic change and the growth of new synaptic connections is constrained by memory suppressor genes (see Abel et al. 1998). One important constraint on the growth of new synaptic connections is CREB-2 (Yin et al. 1994; Bartsch et al. 1995), which when overexpressed blocks long-term synaptic facilitation in Aplysia. When CREB-2 is removed, a single exposure to serotonin, which normally produces an increase in synaptic strength lasting only minutes, will increase synaptic strength for days and induce the growth of new synaptic connections.
function xyds = STEPxyds(Ndots, k)


====Declarative Memory ====
    xyds = (k * randn(2,Ndots));
Molecular and pharmacological studies in hippocampal slice preparations have identified some of the key signaling events that are triggered by Ca2fl influx through theNMDA receptors during the induction of [[LTP]] (Fig. 3). The initial Ca2fl signal activates directly or indirectly at least three critical protein kinases in the postsynaptic neuron: (1) calcium calmodulin-dependent kinase II ([[CaMKII]]) (Malenka et al. 1989; Malinow et al. 1989); (2) protein kinase C (PKC) (Routenberg 1986; Malinow et al. 1988); and (3) the tyrosine kinase Fyn (O’Dell et al. 1991; Grant et al. 1992). These findings provided a catalog of targets for manipulation using advances in mouse genetics that allowed for the selective deletion or knockout of individual genes in the whole animal. The general strategy was to delete a gene critical for [[LTP]] and to then examine both synaptic plasticity and behavioral learning and memory in the same animal to test the idea that [[LTP]] is a key molecular event important for memory storage.


end


The first set of studies applied these techniques to examine the importance of the a subunit of [[CaMKII]] and the tyrosine kinase Fyn. Genetically altered mice lacking either of these kinases were viable and survived to adulthood. However, in each line of mutant mice hippocampal [[LTP]] and spatial memory were impaired. These results extended the link between hippocampal synaptic plasticity and memory, first established pharmacologically with NMDA receptor blockers, and outlined a genetic approach for exploring the mechanisms of synaptic and behavioral plasticity. Genetics is the gold standard for determiningmolecular function in modern biology, and its application to complex questions of neurophysiology and behavior in the mammalian [[brain]] opened up a myriad of molecular questions that were previously inaccessible. However, it soon became clear that the approach suffered a number of drawbacks for the study of circuits and behavior that have stimulated several important technical refinements.


%-------------------------------------------%
% MOVE PARTICLES MAIN FUNCTION
%-------------------------------------------%
function [xyl] = AMPARSTEP(Ndots, xyds, xyl)
for j = 1:Ndots
        xyl(:,j) = xyl(:,j)+xyds(:,j);
end
end


A major question regarding the molecular mechanism of [[LTP]] is whether it is expressed presynaptically, involving an increase in glutamate release; postsynaptically, depending on an increase in the postsynaptic response to glutamate; or through a coordinated change in presynaptic and postsynaptic properties. A number of apparently contradictory results have been reported in the literature over the past 30 years. However, in our view much of the controversy results from the fact that neurons can express multiple forms of [[LTP]] that may differ in their synaptic locus, molecular mechanisms, timescale, and role in learning and memory (Fig. 2).


%-------------------------------------------%
% LIVE DIFFUSION PLOT
%-------------------------------------------%
function [] = MAINPLOT(xyl, lims)
%-------------------------------------------%
xlim = [-lims lims];
ylim = [-lims lims];
zlim = [-5 5];


The controversy dates back to some of the earliest studies of [[LTP]]. Measurements of radiolabeled glutamate binding to hippocampal membranes indicated that [[LTP]] was postsynaptic, caused by an increase in the number of postsynaptic glutamate receptors (Lynch et al. 1982). At the same time another study concluded that [[LTP]] was presynaptic, based on the finding of increased levels of extracellular glutamate following induction of [[LTP]] (Dolphin et al. 1982). The interpretation of such early studies was complicated by the fact that they did not directly assess synaptic function. Rather, it was the finding that [[LTP]] in the Schaffer collateral pathway is associated with a selective increase in the AMPA-type receptor component of the excitatory postsynaptic potential with little change in the NMDA-type receptor component that provided the first evidence that [[LTP]] at this synapse is both initiated and expressed postsynaptically (Kauer et al. 1988). Later it was found that the increase in response of the AMPA receptors to glutamate during [[LTP]] is attributable to the rapid insertion of new clusters of receptors in the postsynaptic membrane from a pool of intracellular receptors stored in recycling endosomes (Carroll et al. 1999; Shi et al. 1999; Park et al. 2004; Nicoll et al. 2006). Other studies, however, have implicated additional presynaptic changes following induction of Schaffer collateral [[LTP]] (Bolshakov and Siegelbaum 1994; Zakharenko et al. 2001; Emptage et al. 2003; Enoki et al. 2009). As nearly all studies of Schaffer collateral [[LTP]] indicate that its induction requires Ca2fl influx into the postsynaptic cell, the finding that [[LTP]] may involve an increase in transmitter release implicates the need for one or more retrograde messengers that are released from the postsynaptic cell to enhance release from the presynaptic cell. As discussed below, whether [[LTP]] is presynaptic or postsynaptic (or both) likely depends on the frequency or pattern of stimulation used to induce plasticity. Changes in presynaptic function associated with [[LTP]] can be assayed selectively by measuring the rate of release of a fluorescent dye, FM 1- 43, from synaptic vesicles in the presynaptic terminals when the vesicles release their contents by exocytosis in response to presynaptic stimulation (Ryan et al. 1996). When [[LTP]] is induced using a 50-Hz tetanic stimulation, there is no change in the rate of dye release in response to presynaptic action potentials, suggesting that the expression of 50-Hz [[LTP]] is purely postsynaptic. However, when [[LTP]] is induced using stronger 200-Hz or theta burst stimulation protocols, there is a marked increase in the rate of dye release, suggesting an enhanced presynaptic function (Zakharenko et al. 2001) that appears to develop more slowly than the enhancement in [[AMPA Receptor|AMPA receptor]] response (Bayazitov et al. 2007). The presynaptic and postsynaptic forms of [[LTP]] also show a differential dependence on NMDA receptors. Whereas 50-Hz [[LTP]] is fully blocked by theNMDA receptor antagonist APV, 200-Hz and theta burst [[LTP]] recruit an NMDA receptor–independent form of [[LTP]] that requires activation of L-type voltage-gated Ca2fl channels (Grover and Teyler 1990; Zahkarenko et al. 2001). Genetic evidence for the existence of distinct presynaptic and postsynaptic loci of [[LTP]] has been provided by studies of [[AMPA Receptor|AMPA receptor]]– and [[brain]]-derived neurotrophic factor (BDNF)-knockout mice. The GluR1 (GluRA) [[AMPA Receptor|AMPA receptor]] subunit is important for the activity-dependent postsynaptic insertion of AMPA receptors with [[LTP]].Knockoutmice carrying a deletion in GluR1 show a severe deficit in “standard” NMDA-dependent [[LTP]] induced by high-frequency stimulation, as might be expected fromprevious studies. Surprisingly, these mice were not impaired in long-term spatial memory as seen with previous knockouts orNMDAreceptor antagonists that blocked [[LTP]] (Zamanillo et al. 1999). Subsequent studies showed that not all forms of [[LTP]] were impaired in these mice; for example, a component of theta burst [[LTP]] was spared (Hoffman et al. 2002). Moreover, not all spatial learning was intact; a short-term form of spatial working memory was impaired in the knockout animals (Reisel et al. 2002).
%=================================%
%      MAIN 2D PLOT
%---------------------------------%
figure(1)
subplot(2,1,1),  
AMPARPlot = gscatter(xyl(1,:),xyl(2,:));
axis([xlim, ylim]);
set(AMPARPlot,'marker','.','markersize',[6],'color',[1 0 0])




A line of mice in which the BDNF gene was selectively deleted in the forebrain shows relatively normal [[LTP]] in response to a 50-Hz tetanic stimulus (Zakharenko et al. 2003). However, thesemice have a significant reduction in [[LTP]] in response to 200-Hz or theta burst tetanic stimulation. Moreover, the ability of these strong [[LTP]] protocols to produce a presynaptic enhancement in the rate of FM 1-43 release is completely blocked in the mutant mice. These data support the view for separable components of presynaptic and postsynaptic [[LTP]] that can be differentially recruited by distinct patterns of physiological activity. Interestingly, whereas a reduction in NMDA receptor–dependent [[LTP]] is observed as animals age, and is correlatedwith an age-related decline in memory, older animals show an increase in L-type Ca2fl channel–dependent [[LTP]] (Shankar et al. 1998). Moreover, L-type Ca2fl channel antagonists improvememory in older animals (Deyo et al. 1989). Clearly the relationship between [[LTP]] and memory is more complex than a simple 1:1 correspondence. Different forms of [[LTP]] have different underlying molecular mechanisms and different roles in behavior that we are just beginning to unravel (e.g., Woodside et al. 2004).
%=================================%
%          3D PLOT
%---------------------------------%
figure(1);
subplot(2,1,2),  
gscatter(xyl(1,:),xyl(2,:)); view(20, 30);
axis normal;
grid off
axis([xlim, ylim, zlim]);
set(gca, 'Box', 'on');


====Long-Term Memory ====
end
Procedural and declarative memories differ dramatically. They use a different logic (unconscious vs. conscious recall) and they are stored in different areas of the [[brain]]. Nevertheless, these two disparatememory processes share severalmolecular steps and an overallmolecular logic. Both are created in at least two stages: one that does not require the synthesis of newproteins and one that does. In both, short-term memory involves covalent modification of preexisting proteins and changes in the strength of preexisting synaptic connections, whereas long-term memory requires the synthesis of new proteins and the growth of new connections. Moreover, both forms of memory use [[PKA]], mitogen-activated protein kinase (MAPK), CREB-1, and CREB-2 signaling pathways to convert short-termto longterm memory. Finally, both forms appear to use morphological changes at synapses to stabilize long-term memory (Bailey et al. 2008). Long-term potentiation in the [[hippocampus]] proved to have both early and late phases, much as long-term synaptic facilitation in Aplysia does. One train of stimuli produces the early phase (E-[[LTP]]), which lasts 1–3 h and does not require protein synthesis. Four or more trains induce the late phase (L-[[LTP]]), which lasts at least 24 h, requires protein synthesis, and is activated by [[PKA]] (Frey et al. 1993; Abel et al. 1997). The role of this L-[[LTP]] has been investigated genetically using mice that express a mutant gene that blocks the catalytic subunit of [[PKA]], or that carry an inhibitory mutation in the CREB-1 gene. Both lines of mice have a serious defect in long-term spatial memory and both have roughly similar defects in [[LTP]]. The early phase is normal but the late phase is blocked, providing evidence linking the phases of [[LTP]] to the phases of memory storage (Silva et al. 1992a,b; Bourtchouladze et al. 1994;Huang et al. 1995; Abel et al. 1997). Finally, an intermediate phase of [[LTP]] that requires [[PKA]] but not new protein synthesis can be induced by two trains of stimuli (Winder et al. 1998). Theoretical studies indicate that these multiple components of plasticity are necessary to generate long-lasting memories in the face of ongoing synaptic plasticity (Fusi et al. 2005).


====Procedural Memory in Vertebrates ====
We now have a good understanding of the neural circuit and molecular mechanisms underlying learned fear and of the role of synaptic plasticity in fear memory, thanks to the work of Joseph LeDoux, Michael Davis, Michael Fanselow, and JamesMcGaugh. Pairing of a tonewith a foot shock leads to a conditioned fear response to the tone alone, which elicits freezing behavior in the conditioned animal. This conditioned fear response depends on the long-term potentiation of the auditory response in neurons of the amygdala (Johansen et al. 2011). Both the synaptic changes and the persistence of the memory for learned fear require [[PKA]], MAPKs, and the activation of CREB (Won and Silva 2008). Moreover, similar to mechanisms of NMDA receptor–dependent [[LTP]], learned fear requires the enhanced trafficking of AMPA receptors to the synapses of amygdala neurons (Rumpel et al. 2005). In contrast to learned fear, when a tone predicts a period of safety when an animal is protected from the foot shock, there is a long-term depression of the auditory inputs to the amygdala (Rogan et al. 2005). Thus, learned fear and learned safety involve opposing changes in synaptic strength. Eye-blink conditioning is produced by pairing a tone (the CS) with an aversive air puff to the eye (the US), resulting in a learned eye blink that is appropriately timed to the paired US (Thompson et al. 1983). Theoretical and experimental studies have proposed that the conditioning involves a relatively simple cerebellar circuit. Prior to learning, activation of cerebellar Purkinje neurons in response to the CS leads to an inhibition of neurons in the interpositus nucleus (one of the deep nuclei of the cerebellum), thereby inhibiting motor output. With conditioning there is a decrease in the Purkinje cell activity in response to the CS, resulting in disinhibition of the neurons of the interpositus nucleus, leading to eye blink. This model is consistent with findings that Purkinje cell activity can be reduced as a result of LTD at the excitatory parallel fiber synaptic input onto the Purkinje neurons (Ito 2001). This decrease in the strength of the parallel fibers occurs when the climbing fiber inputs to the cerebellum are activated in appropriate temporal proximity to parallel fiber activity. Thus, the Purkinje cells become less responsive to input, as a result of a down-regulation of AMPA receptors at the parallel fiber to Purkinje cell synapse. The similarity between the changes in synaptic function and both procedural and declarative learning in the mammalian and invertebrate central nervous systems supports the view that alterations in synaptic strength represent an evolutionarily conserved general mechanism of memory formation. Moreover, studies of fear learning, eye-blink conditioning, and modifications of the vestibular–ocular reflex (Lisberger et al. 1987; Boyden et al. 2006), as well as habituation in Aplysia and crayfish, provide support for the role of both synaptic potentiation and synaptic depression as parallel mechanisms for memory storage.


====Synapse-Specific Local Protein Synthesis and Learning Networks ====
%-------------------------------------------%
There is now significant evidence from various forms of learning in a number of different species that the critical changes that store information in the [[brain]] occur at specific synapses within a circuit. The finding that long-term memory and synaptic plasticity involve changes in gene expression and therefore the nucleus of the cell—which is shared by all the synapses of the neuron—raises the question of how the gene products required for long-term memory influence the specific synapses that were altered to produce the immediate and short-term memory. Studies in both Aplysia (Martin et al. 1997) and the [[hippocampus]] (Frey and Morris 1997) suggest that the synaptic modifications associated with short-term plasticity leave a molecular mark or “tag” on the synapses that were modified. The presence of the synaptic tag allows those synapses to specifically capture and use newly synthesized gene products arriving from the nucleus to stabilize the initial changes produced with learning. How is a synapse marked? Two distinct components of marking have been identified in Aplysia, one that requires [[PKA]] and initiates long-term synaptic plasticity and growth, and one that stabilizes long-term functional and structural changes at the synapse and requires (in addition to protein synthesis in the cell body) local protein synthesis at the synapse (Martin et al. 1997). Because mRNAs are made in the cell body, the need for the local translation of some mRNAs suggests that these mRNAs may be dormant before they reach the activated synapse. If that were true, one way of activating protein synthesis at the synapse would be to recruit a regulator of translation at the activated synapse that is capable of activating dormant mRNA. In Xenopus oocytes, maternal RNA is silent until activated by the cytoplasmic polyadenylation element binding protein (CPEB) (Richter 1999). In Aplysia a new isoform of CPEB (ApCPEB) with novel properties was found in neurons. Blocking this isoform at a marked (active) synapse prevented the maintenance but not the initiation of long-term synaptic facilitation (Si et al. 2003a,b). Indeed, blocking ApCPEB blocks memory days after it is formed. An interesting feature of this isoform of Aplysia CPEB is that its amino terminus resembles the prion domain of yeast prion proteins and endows it with similar self-sustaining properties. But unlike other prions, which are pathogenic, ApCPEB appears to be a functional prion. The active self-perpetuating form of the protein does not kill cells but rather has the important physiological function of maintaining long-term synaptic facilitation.
% MANUAL STEP SIZE FUNCTION
%-------------------------------------------%
function xyds = stepsize(Ndots, Lx)
%-------------------------------------------%


==THE EMERGENCE OF A SYSTEMS APPROACH TO MEMORY STORAGE ==
  Lx(1:2,1:Ndots) = Lx;
  xyd = randi([0 1],Ndots,2)';
  xyd(xyd == 0) = -1;
  xyds = (Lx.*xyd);
 
end


The application of molecular and genetic tools and the use of simple systems have allowed us to test some of the foundational theories of Cajal and Hebb regarding the cellular mechanisms of learning. There are a number of commonalities that have been established across multiple species, such as:


#Synaptic change is elicited by patterns of neuronal activity at critical points within a behavioral circuit.
%-------------------------------------------%
#Both increases and decreases in synaptic strength can contribute to behavioral plasticity.
% MSD SCALED STEPS FUNCTION
#Synaptic plasticity has similar temporal and molecular properties to behavioral learning, e.g., short- and long-term phases dependent on discrete signaling pathways.
%-------------------------------------------%
#Apparently different forms of learning use similar underlying cellular and molecular mechanisms.
function [xyl xyds] = MSDAMPARSTEP(Ndots, xyds, xyl, Ls)
for j = 1:Ndots
        xyds(:,j) = xyds(:,j)*Ls;
        xyl(:,j) = xyl(:,j)+xyds(:,j);
end
end
 


%-------------------------------------------%
% MSD TRACKS GENERATOR
%-------------------------------------------%
function [tracks] = MSDfun(stepN, Nsteps, tracks, xyds)
    time = (0:Nsteps-1)';
    xymsd = xyds';
    xymsd = cumsum(xymsd,1);
    tracks{stepN} = [time xymsd];


One of the remaining challenges in rigorously testing some ideas in the mammalian nervous system is the problem of sparse encoding in distributed networks and the identification of the engram, the physical or functional memory trace present in a neural network posited by Lashley (1950). Although the fine-tuning of the hippocampal representation of the world and the sensitization of the gill-withdrawal reflex in Aplysia may recruit some of the same underlying molecular mechanisms, the changes in the [[hippocampus]] are dispersed throughout a large structure with no clear anatomical segregation. And although the [[hippocampus]] plays a critical role in memory, the formation of complex associations must involve activity in multiple [[brain]] areas. How can the dispersed circuits for a given specific memory or complex representation be isolated and functionally probed in the same manner as a reflex circuit in a simple system? Several advances in the optical and molecular toolbox for circuit analysis in mammals are laying the foundation to answer this type of question. Advances in in vivo optical imaging techniques have enabled the visualization of plastic changes in neuronal properties associated with learning and memory (Hu¨bener and Bonhoeffer 2010). Such changes can involve alterations in morphology of preexisting synapses, including the enlargement of dendritic spines (the sites of a pyramidal neuron’s excitatory input) during [[LTP]] and spine shrinkage during LTD (Kasai et al. 2010). Additional structural changes may involve the growth of new synaptic connections, implied by the appearance of new dendritic spines following induction of synaptic plasticity. That such structural changes may contribute to learning and memory is supported by a recent study that reported the growth of new dendritic spines in motor cortex neurons following motor learning (Xu et al. 2009).
end




One area of rapid progress is in the introduction of genetically encoded molecules that allow the selective activation or suppression of the neurons in which they are expressed with light (Zhang et al. 2007a,b; Zhao et al. 2008; Airan et al. 2009). A great advantage of lightregulated channelrhodopsin or halorhodopsin is that they allow precise millisecond temporal control over action potential firing such that a genetically tagged group of neurons can be fired in a controlled pattern simply by patterning the light pulses. Also effective for turning neurons on or off are ligand-gated proteins with customized binding sites, such as the G-protein-coupled designer receptor (Alexander et al. 2009) and a chimeric ligand-gated ion channel, which are activated by an inert ligand (Magnus et al. 2011). These systems are allowing sparse but genetically defined neural cell types (e.g., inhibitory neurons) to be manipulated selectively within a background of many other functionally distinct cell types. What defines a circuit in the mammalian [[brain]]? At one level there is a clear, developmentally controlled pattern of connectivity, for example, the hippocampal trisynaptic circuit or a cortical column. Although this canonical connectivity is clearly an important constraint on function, what is remarkable is that these circuits can represent so many different external events or encode a wide range of memories. Clearly, any individual neuron can participate in many different representations or memories, and at a deeper level a neural circuit is defined by what it represents. That is, we could define a circuit as all the neurons that are recruited during the recognition of an individual’s home, or during the recollection of one’s last holiday. How many neurons does it take to form a specific memory? How predetermined are these circuits? Howare theymodified during learning and differentially recruited during recall? And how can a new memory be formed through altered synaptic strength without overwriting a preexisting memory encoded in a neuron’s synapses? Some new genetic techniques are beginning to probe these questions. Competition between neurons is necessary for refining neural circuitry, but does it play a role in encoding memories in the adult [[brain]]? In studies of fear conditioning it was found that the introduction of excess or constitutively active CREB into a sparse subset of amygdala neurons caused those neurons to be specifically recruited to encode the memory to which the animals were subsequently trained (Han et al. 2007). Conversely, if such neurons are deleted after learning, that specific fear memory is blocked while other fear associations stay intact (Han et al. 2009). This study reveals that there is great flexibility in the particular group of neurons recruited to any given memory, at least in the amygdala, and that the resting state of the neuron governs the probability that it will be recruited. Long-term memory requires transcriptional activity, and genes such as cfos, zif268, and [[arc]] are rapidly and transiently induced by high-frequency neural activity and have been used for many years to map [[brain]] activity patterns in rodents. By providing a genetic readout of patterns of neural activity, these genes provide the potential to obtain direct molecular control over ensembles of neurons based on their response to a given experience. In one study the cfos promoter was combined with elements of the TETregulatory system in transgenic mice to allow the introduction of a lacZ marker into neurons activated with fear conditioning (Reijmers et al. 2007). The marker provided a longlasting record of [[brain]] activity during learning that could be compared to activity during recall. A partial reactivation of the neurons active during learning occurred, and the strength of the recalled memory was correlated with the degree of circuit reactivation. More importantly, this approach provides an opportunity to introduce any genetically encoded effector molecule into neurons based on their recent activity, providing the potential to study circuits based on the specific memory they encode. Why are there so many forms of synaptic plasticity that differ in their mechanism of induction, time of persistence, and synaptic locus (Fig. 2)? An interesting insight into this question was provided by a theoretical study that approached the question of how a memory can persist in the face of the barrage of synaptic inputs and synaptic plasticity that a neuron experiences during an individual’s lifetime. Although it was impossible to encode robust memories with a single form of plasticity, multiple forms of plasticity with distinct timescales of induction and persistence were able to yield persistent memory storage (Fusi et al. 2005). A challenge in the future will be to examine how the diverse array of plasticity mechanisms may indeed cooperate and interact to yield a unified mechanism of long-lasting yet ongoing memory storage.
%-------------------------------------------%
% MSD TRACKS ANALYSIS
%-------------------------------------------%
function [] = MSDfunction(tracks,Ndots,Nsteps,D,Dn,L,dT,k,Scale,MSDtest)


SPACE_UNITS = 'µm';
TIME_UNITS = 's';
N_PARTICLES = Ndots;
N_TIME_STEPS = Nsteps;
N_DIM = 2;


oD = D; % raw µm^2/s
D  = D*Scale;      % to-scale µm^2/s


==Compendium of the Main Ideas for the Manuscript==
oDn = Dn; % raw µm^2/s
The neural correlates of learning and memory at the molecular level involve changes in the communication efficacy at the synapse between two neurons. If the communication efficacy is increased (i.e. it is easier for one neuron to produce a signal in another neuron) - this is termed potentiation. The mechanisms by which neurons maintain potentiated synapses is currently under debate, however, a fundamental feature of long-term potentiation ([[LTP]]) involves sustaining a receptor increase at the post-synaptic density (PSD).
Dn = Dn*Scale; % to-scale µm^2/s
The dominating theory about how [[LTP]] is maintained at the synapse involves a mechanism where receptors from the cytosolic pool are continually trafficked directly to a potentiated synapse. One line of experimental work (pioneered by Todd Sacktor’s group) suggests that prion-like molecular switches, such as [[PKMz]], continually escort receptors to potentiated synapses. In simplified terms the idea is that: (1) short-term potentiation involves a burst of kinase-mediated receptor trafficking to the synapse; (2) when the kinases involved with short-term receptor trafficking languish, either through active suppression or from a dwindling energy supply, synapses return to a state of baseline connectivity; but if (3) a kinase (like [[PKMz]]) had the ability to remain active, this could result in constitutive receptor trafficking to potentiated synapses, indefinitely. In this manuscript, “Constitutive Receptor Trafficking” will be referred to as “CoRT” and “maintenance of [[LTP]]” will be referred to as “mLTP” -- “CoRT-mLTP” will refer to the theory above, that CoRT is the primary mechanism behind mLTP.
Evidence to support the CoRT-mLTP theory is at best, equivocal. Exempla gratia: the experimental work on [[PKMz]] is under heavy scrutiny, stemming from misconceptions surrounding the utility of a molecule used to silence [[PKMz]] - Zeta Inhibitory Peptide (ZIP); nearly every bedrock experiment that implicated [[PKMz]] in constitutive receptor trafficking involved the use of ZIP to inhibit [[PKMz]]. However, and quite inexplicably, a recent study revealed that ZIP doesn’t actually interact with [[PKMz]] . Some consider this a major blow to the [[PKMz]] story, while others contend that one study does not supplant an entire body of work. As it is, time will tell if the CoRT-mLTP theory will strengthen or weaken with further study.


oL = L; % raw µm
L = L*Scale; % to-scale µm


I would like to introduce an alternative theory that explains the maintenance of [[LTP]], one that doesn’t require CoRT by prion-like kinases. I propose a model where mLTP operates through the trapping of receptors at the PSD by scaffolding molecules. In this manuscript, “Trapping Receptors At PSD” will be referred to as “TRAP” -- “TRAP-mLTP” will refer to the theory that TRAP is the primary mechanism behind mLTP. It is possible that TRAP is not only the mechanism behind mLTP, but could also be the induction mechanism of any lasting form of [[LTP]]. The theoretical basis of TRAP-mLTP can be gleaned from two bits of information: (1) receptors readily diffuse in and out of synapses, throughout the dendrite, and into neighboring synapses; (2) recent single particle tracking experiments show that AMPA receptors diffuse quickly in the dendritic membrane outside the synapse, but once receptors enter the PSD they diffuse at a significantly slower rate. Thus, TRAP-mLTP theory contends that potentiated synapses simply need trap receptors more efficiently than their neighbors; indeed that is the crux of the TRAP-mLTP theory, receptor trapping modulation is an indispensible feature of potentiated synapses, sine qua non!
dTbase = dT; % raw time-step
dT = dT*Scale; % to-scale time-step
k = k; % stdv of step distribution


ma = msdanalyzer(2, SPACE_UNITS, TIME_UNITS);
ma = ma.addAll(tracks);
disp(ma)


Why is the TRAP-mLTP model more probable than CoRT-mLTP model? First, even if molecules like [[PKMz]] worked around the clock, diligently trafficking [[AMPAR]] to a given synapse, these receptors would just diffuse to surrounding synapses. It would also be very energy inefficient to continually synthesize and traffic receptors to maintain each potentiated synapse. Also, it would be very difficult to titrate potentiation given that prion-like molecules ramp up their own activity; that is, once several prions are activated, these will go on to activate the remaining prions in the surrounding area. Thus, potentiation would be an all-or-nothing process at the synapse instead of having synapses with graded levels of potentiation. On the other hand, under TRAP mechanisms potentiated synapses could be made to have graded levels of “stickiness”. As such, it wouldn't matter where on the membrane a bunch of [[AMPAR]] were trafficked (directly to the synapse, or into the membrane surrounding the spine), as the receptors diffuse, they would spend the most time in sticky synapses. Therefore, at any given moment, sticky synapses would have more receptors than neighboring synapses. The TRAP-mLTP model would also be more energy efficient. It would only require some PSD scaffolding-associated proteins to slow the diffusion of passing by receptors. This could be accomplished by physical mechanisms that do not require chemical conversion, requiring little energy (possibly none whatsoever). Furthermore, unlike the proposed CoRT mechanism, TRAP wouldn't require the continual synthesis of receptors for trafficking. It could function off a semi-stable pool of membrane associated receptors. As the battle is waged between synapses to sequester receptors, they would all be fighting over the same pool of receptors. This zero sum game necessarily implies that as some receptors increase their supply of receptors, others will have less - amplifying some synapses while others are muted. Under CoRT mechanisms, all synapses necessarily act independently, leading to the possibility of runaway neural activation.
figure
ma.plotTracks;
ma.labelPlotTracks;


ma = ma.computeMSD;
ma.msd;


t = (0 : N_TIME_STEPS)' * dT;
[T1, T2] = meshgrid(t, t);
all_delays = unique( abs(T1 - T2) );


figure
ma.plotMSD;




cla
ma.plotMeanMSD(gca, true)


mmsd = ma.getMeanMSD;
t = mmsd(:,1);
x = mmsd(:,2);
dx = mmsd(:,3) ./ sqrt(mmsd(:,4));
errorbar(t, x, dx, 'k')


===LTP-related molecular level plasticity===
[fo, gof] = ma.fitMeanMSD;
plot(fo)
ma.labelPlotMSD;
legend off


Its likely that the mechanism for transporting neurotransmitter receptors to synapses is conserved across receptor type, yet the details of this mechanism are largely unknown. Several models suggest that receptors are trafficked or internalized directly at the synaptic membrane, while others suggest membrane trafficking happens outside of the synapse and diffuse laterally to the post-synaptic density (PSD).


ma = ma.fitMSD;


good_enough_fit = ma.lfit.r2fit > 0.8;
Dmean = mean( ma.lfit.a(good_enough_fit) ) / 2 / ma.n_dim;
Dstd  =  std( ma.lfit.a(good_enough_fit) ) / 2 / ma.n_dim;


Dheader1 = ['Raw Unscaled Values'];
Dhead1 = ['    D        Dn        L'];
Ddat1 = [oD oDn oL];
disp(' ')
disp(Dheader1)
disp(Dhead1)
disp(Ddat1)


===Diffusion===


==Tardin, Choquet et al. (2003). Direct imaging of lateral movements of AMPA receptors inside synapses. The EMBO Journal, 22(18)==
yourtesthead = ['YOU ARE TESTING DIFFUSION FOR:'];
if MSDtest(1)
yourtest = ['  D:  original diffusion rate'];
elseif MSDtest(2)
yourtest = ['  Dn:  new diffusion rate'];
elseif MSDtest(3)
yourtest = ['  L:  step length'];
else
yourtest = ['  generic diffusion rate'];
end
disp(yourtesthead)
disp(yourtest)


;Statements:
disp(' ')
Trafficking of [[AMPAR]] in and out of synapses is crucial for synaptic plasticity. Protocols that induce plasticity of synaptic transmission in culture result in changes of [[AMPAR]] concentration at synapses and are thought to mimic at the molecular level the processes of [[LTP]] and LTD.  
fprintf('Estimation of raw D coefficient from MSD:\n')
fprintf('D = %.3g ± %.3g (mean ± std, N = %d)\n', ...
    Dmean, Dstd, sum(good_enough_fit));




Membrane trafficking may occur outside of the synapse and accumulate at the PSD after a short delay (Passafaro et al. 2001). Altogether, a unified picture of the postsynaptic density could be one where receptors are immobilized for transient periods of time related to the receptor-scaffold affinity. This could also be true of NMDA receptors (Tovar and Westbrook, 2002).




;Findings:
% Retrieve instantaneous velocities, per track
Application of glutamate increased the diffusion rate of GluR2-containting [[AMPAR]] whereas a protocol designed to induce calcium influx (stimulation of NMDAR with glycine, glutamate) reduced the percentage of diffusible AMPARs at the PSD. Bath application of 100 uM glutamate caused an 85% increase in [[AMPAR]] endocytosis within 15 min (corresponding to a 22% drop in total membrane expression). Conversely , the calcium influx protocol (20 uM biccuculine, 1 uM strychnine, 200 uM glycine) caused a 59% increase in [[AMPAR]] membrane expression. Glutamate caused a 55% increase in [[AMPAR]] diffusion within synapses, but did not change diffusion outside synapses. Furthermore, glutamate decreased the number of completely immobile AMPARs by 30%. Interestingly, Glutamate causes endocytosis of AMPARs, and internal AMPARs are immobile. Therefore it seems like glutamate may be causing a general endocytotic episode at non-synaptic AMPARs, perhaps not even at the synapse that received the glutamate application. In a parallel effect, it was found that blocking calcium with BAPTA increased the % of mobile AMPARs. Newly inserted receptors were found to be initially diffusive and then stabilized at synaptic sites. In summary, they found that bath application of glutamate induces rapid depletion of AMPARs from PSDs increases synaptic diffusion rate, decreases % of completely immobile receptors, increases proportion of receptors in the area surrounding the synapse (juxtasynaptic region). Activation of NMDARs results in increased surface expression of AMPARs -- in the first few minutes there is mainly a decrease in the proportion of immobile synaptic receptors, but after 40 min, both diffusion rates and percentages of immobile synaptic receptors are back to control values and the proportion of juxtasynaptic receptors is decreased. This observation relates to the fate of newly exocytosed AMPARs: using cleavable extracellular tags, it was observed that at early times after exocytosis, new GluR1 containing AMPARs are diffusively distributed along dendrites. This is followed by their lateral translocation and accumulation into synapses (Passafaro et al., 2001). GluR2 subunits were addressed directly at synapses. In our experiments, we followed the movement of native GluR2 containing AMPARs, where the data suggests that at the level of synapses themselves, newly added receptors are initially diffusive and then stabilize over time.  
  trackV = ma.getVelocities;


AMPA receptors that lack edited GluA2 subunits have high single channel conductance, are permeable to Ca2+, are blocked by polyamines causing inward rectification at depolarized potentials.
% Pool track data together
TV = vertcat( trackV{:} );


---------------
% Velocities are returned in a N x (nDim+1) array: [ T Vx Vy ...]. So the
*100 uM glutamate - within 15 min
% velocity vector in 2D is:
*85% increase in [[AMPAR]] endocytosis
V = TV(:, 2:3);
*22% drop in total membrane expression
*55% increase in [[AMPAR]] diffusion rate within synapses
*0% increase in [[AMPAR]] diffusion rate outside synapses
*30% decrease in completely immobile [[AMPAR]] at PSD
--
*Start: 100 AMPARs in PSD
*Usual endocytosis rate: -0.25% / min
*Add: 100 uM glutamate
*New endocytosis rate: -1.5% / min
*Time: 15 min
*Final: 77.5 AMPARs
---------------


---------------
% Compute diffusion coefficient
*calcium influx protocol (20 uM biccuculine, 1 uM strychnine, 200 uM glycine)  
varV = var(V);
*59% increase in [[AMPAR]] expression
mVarV = mean(varV); % Take the mean of the two estimates
--
Dest = mVarV / 2 * dT;
*Start: 100 AMPARs in PSD
*Usual endocytosis rate: -0.25% / min
*Add: NMDA antagonists above
*New exocytosis rate: +4% / min
*Time: 15 min
*Final: 160 AMPARs
---------------


==Retrieval-specific endocytosis of GluA2-AMPARs underlies adaptive reconsolidation of contextual fear ==
===Rao-Ruiz, Spijker, et al.===
[[File:3y-2.png|thumb|400px]]
A consolidated memory returns to a transient destabilized state shortly after reactivation, necessitating a dynamic time-dependent process of reconsolidation to persist further. During this reconstruction, a memory is labile and subject to change. In general, a memory-recall causes internalization of [[AMPAR]] at activate synapses for ~2 hours. Then [[AMPAR]] repopulate these synapses and return to baseline levels, and sometimes even higher levels.
[[File:3y-4.png|thumb|left|400px]]
[[File:3y-3.png|thumb|300px]]


;GROUPS
*NS: No Shock
*US: Shock
*NR: No Retrieval (24h later)
*R: Retrieval (24h later)


Dheader2 = ['Scaling to model...'];
Dhead2 = ['    D        Dn        L'];
Ddat2 = [D Dn L];


Tissue collected 1 h after retrieval for western blot and ephys
disp(' ')
disp(Dheader2)
disp(Dhead2)
disp(Ddat2)
fprintf('Estimation from velocities histogram:\n')
fprintf('Tested D = %.3g %s, compare to scaled Des value of %.3g %s\n', ...
    Dest, [SPACE_UNITS '²/' TIME_UNITS], D, [SPACE_UNITS '²/' TIME_UNITS]);


% printf('D.psd target value was %.3g %s\n', ...
%    Dest, msdDpsd, [SPACE_UNITS '²/' TIME_UNITS]);


====RESULTS====
end
Down-regulation of all [[AMPAR]] subtypes and smaller mEPSC amplitudes 1 h after retrieval. Increase at 7 h.




Start at 100% baseline expression
</syntaxhighlight>
*Post-Recall: 1 h 4 h 7 h
*GluR1 70% 100% 100%
*GluR2 85% 85% 130%
*GluR3 50% 50% 100%


}}


Blocking GluR2 internalization with 3Y peptide (3A is a control peptide) 1 h before or 1 h after recall prevented a subsequent GluR2 increase at 7 hours. The narrow decay time found at 7 hours in 3A controls suggests that synapses are composed more of GluR2 than GluR1 or GluR3 receptors which are permeable to calcium. Furthermore, 3Y increased fear memory when tested 2 h (RT2) after a recall event (RT1) or 24 h (RT3) after recall. 
<br /><br />
[[File:3y-2.png|thumb|500px]]
---------------
;Start at 100% baseline expression
*Post-Recall: 1 h 4 h 7 h
*GluR1 70% 100% 100%
*GluR2 85% 85% 130%
*GluR3 50% 50% 100%
---------------
{{Clear}}
{{Clear}}
==MAKING QUANTUM DOTS==
To create a quantum dot that will tag AMPA receptors choose a quantum dot conjugated to an [http://en.wikipedia.org/wiki/Immunoglobulin_G IgG] antibody that also has a fragment antigen-binding region (aka F(ab’)2 or [http://en.wikipedia.org/wiki/Fragment_antigen_binding Fab] fragment, the part of an antibody that binds antigens). This entire construct, QD-IgG-Fab, is your secondary antibody construct and the IgG and Fab are usually from different host animals. This is then incubated with primary antibody fragment (Fab) that is specific to the protein of interest, in this case AMPA receptors.
*[https://www.invitrogen.com/site/us/en/home/brands/Molecular-Probes/Key-Molecular-Probes-Products/Qdot/qdot_reg__nanocrystal.html Invitrogen Quantum Dots]
*[http://www.bdbiosciences.com/ecat/txDetailedTable.jsp?from=simpleTable&action=SELECT&form=formTree_catBean&item=745783&size=20&wcm_page=/research/neuroscience/productlist/reagentsassays.jsp&wcm_title=Research%20Applications%20-%20Neuroscience%20-%20Product%20List%20-%20Reagents%20and%20Assays&wcm_category=745783 BD Biosciences]
*[http://www.nature.com/neuro/journal/v12/n7/full/nn.2338.html#online-methods Choquet Methods]
[http://www.bdbiosciences.com/ptProduct.jsp?prodId=29038&catyId=745783&page=product&wcm_page=/research/neuroscience/productlist/reagentsassays.jsp&wcm_title=Research%20Applications%20-%20Neuroscience%20-%20Product%20List%20-%20Reagents%20and%20Assays&wcm_category=745783 GluR2 Primary Antibody]
===Single-Nanoparticle Tracking. ===
A total of 1 μL of 655-nm [[Quantum Dots|Quantum dots]] (Qdots) conjugated (see also [http://en.wikipedia.org/wiki/Polyclonal_antibodies antibodies]) to goat (Fab‘)2 anti-mouse IgG ([http://products.invitrogen.com:80/ivgn/en/US/direct/invitrogen?cmd=catProductDetail&productID=Q11422MP Invitrogen]) were incubated with 1 μL Fab anti-GluA2 in 7 μL PBS for 20 min at room temperature. Nonspecific binding was blocked by adding 1 μL of 10% casein stock solution for 15 min (Vector Laboratories), and this solution was kept at 4 °C throughout the experiment. Neurons were incubated for 10 min at 37 °C in 1 mL culture medium containing 1 μL of the anti-GluA2-coated Qdot solution, then rinsed and mounted in an aluminum chamber containing Tyrode solution (30 mM glucose, 120 mM NaCl, 5 mM KCl, 2 mM MgCl2, 2 mM CaCl2, 25 mM Hepes) on a Nikon microscope (NIKON Eclipse TE2000-U) thermostated to 37 °C using an air blower (World Precision Instruments) and an objective heater (Bioptechs). Single Qdots were detected through a100 × 1.4 N.A. oil immersion objective, using a 100-W mercury lamp and appropriate excitation/emission filters (Chroma). Sequences of 50 s, corresponding to stacks of 1,000 images with an integration time of 50 ms, were acquired using a CCD camera (Quantem; Roper Scientific). For each coverslip, Qdots were followed on randomly selected dendritic regions (size 20 × 20 μ m) for up to 20 min. Two coverslips of each condition were processed for a total of 3 – 4 neuronal cultures. We checked for specificity of Qdot binding by preparing primary hippocampal cultures from GluA2 KO mice dissected at p0. Anti – GluA2- conjugated Qdots bound minimally to cultures from GluA2 KO compared with those prepared from wild-type littermates.
===Antibodies and drugs.===
[[File:Fab.png|thumb|200px]]
The antibody to the [http://www.ncbi.nlm.nih.gov/pubmed/7993626 N-terminal epitope of the GluR1 subunit] was described previously46. We used a commercial antibody to an N-terminal epitope of the GluR2 subunit to detect GluR2 ([http://www.bdbiosciences.com/ecat/ BD Pharmigen]).
[[AMPA Receptor|AMPA receptor]] labeling and synaptic live staining.
Quantum dot 655 goat F(ab')2 antibody to rabbit IgG conjugate (H+L) highly cross-absorbed and quantum dot 655 goat F(ab')2 antibody to mouse IgG conjugate (H+L) highly cross-absorbed were obtained from Quantum Dot (Invitrogen). Receptors were stained using [[Quantum Dots|quantum dots]] pre-coated with antibody to GluR1 or monoclonal antibody to GFP. [[Quantum Dots|Quantum dots]] (0.1  M) were incubated with 1  g of antibody in 10  l of phosphate-buffered saline (PBS) for 15–30 min. Unspecific binding was blocked by adding casein (Vector Laboratories) to the pre-coated quantum dot 15 min before use. Neurons were incubated 5–10 min at 37 °C in culture medium with pre-coated [[Quantum Dots|quantum dots]] (final dilution of 0.1–0.01 nM). The incubation was followed by four washing steps of 30 s each. All incubations and washes were performed in pre-warmed extracellular HEPES-buffered solution (see below).
===Single molecule optical microscopy.===
Cells were imaged at 35–37 °C in an open chamber mounted onto an inverted microscope (IX70 Olympus) equipped with a 60  (NA = 1.35, Olympus) or 100  objective (NA = 1.3, Olympus).
[[Quantum Dots|Quantum dots]] and Homer1C-DsRed were detected using a xenon lamp (excitation filter HQ500/20X (Chroma), Mitotrack 560RDF55 (Omega)) and appropriate emission filters (HQ560/80M (Chroma Technology), 655WB20 (Omega Optical)). Fluorescent images from [[Quantum Dots|quantum dots]] were acquired with an integration time of 33 ms with up to 2,000 consecutive frames. Signals were recorded with a back-illuminated thinned CCD camera (Cascade 512BFT, Roper Scientific).
Quantum dot–labeled GluR1 receptors were monitored on randomly selected dendritic regions for up to 20 min of total experimental time. Recording of the synaptic marker over time revealed that the mobility of synapses was much slower in comparison to the mobility of the receptors (data not shown). Mobility of synapses themselves did not seem to affect our location method. Acquisition of the synaptic labeling before and after quantum dot recording as well as [[Quantum Dots|quantum dots]] fixed on the cover slip allowed us to compensate mechanical drifts of the stage, which would have lead to a false interpretation of receptor location.
===Receptor tracking and analysis.===
The tracking of single [[Quantum Dots|quantum dots]] was performed with homemade software based on Mathlab (Mathworks). Single [[Quantum Dots|quantum dots]] were identified by their blinking fluorescent emission and their diffraction-limited signals. Owning to the random blinking events of the [[Quantum Dots|quantum dots]], the trajectory of a quantum dot–tagged receptor could not be tracked continuously. Subtrajectories of the same receptor were reconnected when the positions before and after the dark period were compatible with borders set for maximal position changes between consecutive frames and blinking rates. The values were determined empirically: 1–2 pixels for maximal position change between two frames and maximal dark periods of 25 frames.
Mean square displacement curves were calculated for reconnected trajectories of at least 100 frames. Diffusion coefficients were calculated by a linear fit of the first four points of the msd plots versus time. The resolution limit for diffusion was 0.001  m2 s-1, as determined by msd calculations of fixed [[Quantum Dots|quantum dots]]. The resolution precision was  40 nm. Dwell times of individual receptors given in the results were measured from trajectories in which the entry and exit from the compartments could be identified.
Synaptic or ECM compartments were identified by homer1c-DsRed expression or HABP staining, respectively. Pixels assigned to synapses or ECM were defined as a set of connected pixels obtained using two-dimensional object segmentation by wavelet transformation47
===Electrophysiology.===
The extra cellular medium contained 145 mM NaCl, 2.5 mM KCl, 2 mM MgCl2, 2 mM CaCl2, 10 mM HEPES and 10 mM D-glucose (pH 7.4). To block GABAA receptors, we added 50  M picrotoxin to the extra cellular medium. The bath temperature was kept at 33–35 °C. Borosilicate pipettes were used to produce patch electrodes with resistances of 3–5 M . A standard pipette solution was used to characterize neuronal properties in voltage and current-clamp conditions during development (Supplementary Fig. 7) and contained 140 mM potassium gluconate, 2 mM MgCl2, 4 mM NaATP, 0.1 mM EGTA, 10 mM HEPES, 10 mM phosphocreatine, 0.4 mM GTP (pH 7.25). To record mEPSC and to decrease space-clamp difficulties, we used another recording solution 125 mM CH3CsSO3, 2 mM MgCl2, 1 mM CaCl2, 4 mM NaATP, 10 mM EGTA, 10 mM HEPES and 0.4 mM GTP (pH 7.25).
Recordings in voltage and current clamp mode were performed with an EPC10 double patch-clamp amplifier (HEKA Electronics). Data were acquired and stored using Pulse-Pulse fit software version 8.62 (HEKA Electronics, Lambrecht, Germany) and analyzed with IGOR (WaveMetrics) and GraphPad Prism software.
Spontaneous events were analyzed by Minianalysis (Synaptosoft). Local activation of receptors was performed by iontophoresis of glutamate using an amplifier from NPI Electronics. Pipettes for iontophoretic stimulation had resistances between 40–60 M  when filled with 150 mM sodium glutamate (pH 7.4). A small retaining current was needed to keep glutamate inside the pipette (usually between 10–50 nA). Current pulses between 30 and 600 nA and 1–2 ms duration were required to evoke [[AMPAR]]-mediated currents between amplitudes of 30–600 pA under control conditions.
===Outside-out recordings.===
Outside-out patches were pulled from 14–21 DIV neurons. Internal solution contained 130 mM CsCl, 2 mM MgCl2, 10 mM EGTA, 10 mM HEPES and 4 mM Na2ATP. Pipette resistance was 3.5–4.5 M . After patch formation, the pipette was placed under the flow of a theta application pipette containing HEPES-buffered solution in one line and HEPES-buffered solution, 10 mM glutamate and 20 mM sucrose in the other line to clearly visualize the interface between solutions. The application pipette was immerged in the bath and heated to 37 °C for at least 1 cm. It is thus assumed that solutions were close to that temperature. Fast application was achieved with a piezo-electric manipulator (Burleigh). After the recording, the application was controlled by measuring the junction current between the two solutions. To measure recovery from desensitization, it is important to verify that 1-ms applications effectively saturate receptors. We verified this by measuring the amplitude of the currents evoked by 1- or 100-ms applications (Supplementary Fig. 6). If the former was less than 80% of the latter, the recording was discarded; on average, current amplitudes were 497.2  160 pA (n = 10) for control and 334.3  143 pA (n = 10) for treated neurons, and the amplitude ratios (1 ms/100 ms) were 0.9  0.03 and 0.91  0.05 for control and treated neurons, respectively.
===FRAP.===


==SI Fig. 3 - Title==
Text Text Text


Transfected neurons (21–30 DIV) were placed on the heated stage (37 °C) of an inverted microscope (Leica CTR 6500) and continually perfused with preheated (37 °C) extracellular solution (composition as described above). For low-pH solution, HEPES was replaced by MOPS and adjusted to pH 5.5. To test the population of surface pHGFP-GluR1–containing AMPARs of a particular cell, we used a gravity-driven rapid solution exchange using a theta-glass electrode containing low-pH solution in one channel and NH4Cl (50 mM) in the other channel to determine the ratio between the fluorescent intensities48. Fluorescence was excited using a monochromator (Cairn) controlled by Metamorph software (Universal Imaging). To photobleach locally, we used a sapphire laser 488-20 (Coherent) at 30% power to avoid photodamage. The laser was coupled to the microscope via a galvometric mirror (Roper Scientific), which allowed us to photobleach several regions in a short time window. Recovery from photobleaching was monitored by consecutive acquisition at a 10-Hz acquisition rate. Recovery curves were corrected for continuous photobleaching and background noise as described elsewere49.


==SI Fig. 4 - Title==
Text Text Text


===FLIP.===
For FLIP experiments, the laser beam was parked at the dendritic shaft at a power of 10% and a additional 75% intensity filter was used to avoid photodamage in the continuous bleached region. Continuous laser illumination was interrupted during image acquisition at a frequency of 0.2 Hz. Control of surface expression and experimental conditions were similar to those for the FRAP experiments described above.


==SI Fig. 5 - Title==
Text Text Text




[[Category:Qual]]
[[Category:Synaptic Plasticity]]

Latest revision as of 12:08, 5 January 2015

Qual Paper SI Material

Qual Project Source Code

Error creating thumbnail: File missing
All source code used in my qualifying exam project can be found here in my github repo for the project. An online version of my qual with enhanced features like citation data popup graphics and animations can be found on this page


SI Fig. 1 - Actin Filament Surface Hull

<html><iframe width="560" height="315" src="//www.youtube.com/embed/JH-hGjzhEFQ" frameborder="0" allowfullscreen></iframe></html>


SI Fig. 2 - Brownian Motion Matlab Code

Brownian Motion Matlab Code



function [boom] = BradsBrownianMotionScript()
format compact;
format short;
close all;

% Note: This matlab script requires 'msdanalyzer' toolbox
%-------------############################------------------%
%                 STARTING PARAMETERS
%-------------############################------------------%
D = .3;                     % Diffusion Rate
Ds = .1;                    % Diffusion Scalar (Ds = Dn)
Dn = D/(D/Ds);              % new D after scaling L
d = 2;                      % dimensions
dT = 1;                     % time step
k = sqrt(d*D);	            % stdev of D's step size distribution
MSD = 2*d*D;                % mean squared displacement
L = sqrt(2*d*D);            % average diagonal (2D) step size
Lx = L/sqrt(2);             % average linear (1D) step size
Ls = 1/sqrt(D/Ds);          % scales Lx values for Dn


MSDtest = [1 0 0];			% test: D, Dn, or L
Scale = 1/10;				% scale of model
Ndots = 100;
Nsteps = Ndots;


xyl = ones(2,Ndots);
xyds = ones(2,Ndots);
lims = ((D+1)^2)*10;


%===========================================================%
%               LIVE PARTICLE DIFFUSION
%-----------------------------------------------------------%
for t = 1:Nsteps

    xyds = STEPxyds(Ndots, k);
	[xyl] = AMPARSTEP(Ndots, xyds, xyl);
	MAINPLOT(xyl, lims);

end
%===========================================================%


%===========================================================%
%               MSD RANDOM STEPS ANALYSIS
%-----------------------------------------------------------%
tracks = cell(Ndots, 1);

stepN = 1;
for t = 1:Nsteps 

	xyds = STEPxyds(Ndots, k);
	[xyl] = AMPARSTEP(Ndots, xyds, xyl);
    [tracks] = MSDfun(stepN, Nsteps, tracks, xyds);

stepN = stepN+1;
end
MSDfunction(tracks,Ndots,Nsteps,D,Dn,L,dT,k,Scale,MSDtest);





%===========================================================%
%               MSD UNIFORM STEPS ANALYSIS
%-----------------------------------------------------------%
stepN = 1;
for t = 1:Nsteps 

xyds = stepsize(Ndots, Lx);
		
	[xyl xyds] = MSDAMPARSTEP(Ndots, xyds, xyl, Ls);
    [tracks] = MSDfun(stepN, Nsteps, tracks, xyds);

stepN = stepN+1;
end
MSDfunction(tracks,Ndots,Nsteps,D,Dn,L,dT,k,Scale,MSDtest);


boom = 'done';
%-------------############################------------------%
end %         ##    END MAIN FUNCTION   ##
%-------------############################------------------% 
%%





%%
%-------------############################------------------%
%             ##      SUBFUNCTIONS      ##
%-------------############################------------------% 


%-------------------------------------------%
% STEP SIZE GENERATOR
%-------------------------------------------%
function xyds = STEPxyds(Ndots, k)

    xyds = (k * randn(2,Ndots));

end


%-------------------------------------------%
% MOVE PARTICLES MAIN FUNCTION
%-------------------------------------------%
function [xyl] = AMPARSTEP(Ndots, xyds, xyl)
	
	for j = 1:Ndots
        xyl(:,j) = xyl(:,j)+xyds(:,j);
	end
	
end


%-------------------------------------------%
% LIVE DIFFUSION PLOT
%-------------------------------------------%
function [] = MAINPLOT(xyl, lims)
%-------------------------------------------%
xlim = [-lims lims];
ylim = [-lims lims];
zlim = [-5 5];

%=================================%
%       MAIN 2D PLOT
%---------------------------------%
figure(1)
subplot(2,1,1), 
AMPARPlot = gscatter(xyl(1,:),xyl(2,:));
axis([xlim, ylim]);
set(AMPARPlot,'marker','.','markersize',[6],'color',[1 0 0])


%=================================%
%           3D PLOT
%---------------------------------%
figure(1);
subplot(2,1,2), 
gscatter(xyl(1,:),xyl(2,:)); view(20, 30);
axis normal;
grid off
axis([xlim, ylim, zlim]);
set(gca, 'Box', 'on');

end


%-------------------------------------------%
% MANUAL STEP SIZE FUNCTION
%-------------------------------------------%
function xyds = stepsize(Ndots, Lx)
%-------------------------------------------%

   Lx(1:2,1:Ndots) = Lx;
   xyd = randi([0 1],Ndots,2)';
   xyd(xyd == 0) = -1;
   xyds = (Lx.*xyd);
   
end


%-------------------------------------------%
% MSD SCALED STEPS FUNCTION
%-------------------------------------------%
function [xyl xyds] = MSDAMPARSTEP(Ndots, xyds, xyl, Ls)
	
	for j = 1:Ndots
        xyds(:,j) = xyds(:,j)*Ls;
        xyl(:,j) = xyl(:,j)+xyds(:,j);
	end	
	
end


%-------------------------------------------%
% MSD TRACKS GENERATOR
%-------------------------------------------%
function [tracks] = MSDfun(stepN, Nsteps, tracks, xyds)
    time = (0:Nsteps-1)';
    xymsd = xyds';
    xymsd = cumsum(xymsd,1);
    tracks{stepN} = [time xymsd];

end


%-------------------------------------------%
% MSD TRACKS ANALYSIS
%-------------------------------------------%
function [] = MSDfunction(tracks,Ndots,Nsteps,D,Dn,L,dT,k,Scale,MSDtest)

SPACE_UNITS = 'µm';
TIME_UNITS = 's';
N_PARTICLES = Ndots;
N_TIME_STEPS = Nsteps;
N_DIM = 2;

oD = D;				% raw		µm^2/s
D  = D*Scale;       % to-scale	µm^2/s

oDn = Dn;			% raw		µm^2/s
Dn = Dn*Scale;		% to-scale	µm^2/s

oL = L;				% raw		µm
L = L*Scale;		% to-scale	µm

dTbase = dT;		% raw time-step 
dT = dT*Scale;		% to-scale time-step
k = k;				% stdv of step distribution

ma = msdanalyzer(2, SPACE_UNITS, TIME_UNITS);
ma = ma.addAll(tracks);
disp(ma)

figure
ma.plotTracks;
ma.labelPlotTracks;

ma = ma.computeMSD;
ma.msd;

t = (0 : N_TIME_STEPS)' * dT;
[T1, T2] = meshgrid(t, t);
all_delays = unique( abs(T1 - T2) );

figure
ma.plotMSD;


cla
ma.plotMeanMSD(gca, true)

mmsd = ma.getMeanMSD;
t = mmsd(:,1);
x = mmsd(:,2);
dx = mmsd(:,3) ./ sqrt(mmsd(:,4));
errorbar(t, x, dx, 'k')

[fo, gof] = ma.fitMeanMSD;
plot(fo)
ma.labelPlotMSD;
legend off


ma = ma.fitMSD;

good_enough_fit = ma.lfit.r2fit > 0.8;
Dmean = mean( ma.lfit.a(good_enough_fit) ) / 2 / ma.n_dim;
Dstd  =  std( ma.lfit.a(good_enough_fit) ) / 2 / ma.n_dim;

Dheader1 = ['Raw Unscaled Values'];
Dhead1 = ['    D        Dn        L'];
Ddat1 = [oD oDn oL];
disp(' ')
disp(Dheader1)
disp(Dhead1)
disp(Ddat1)


yourtesthead = ['YOU ARE TESTING DIFFUSION FOR:'];
if MSDtest(1)
	yourtest = ['   D:   original diffusion rate'];
elseif MSDtest(2)
	yourtest = ['   Dn:  new diffusion rate'];
elseif MSDtest(3)
	yourtest = ['   L:  step length'];
else
	yourtest = ['   generic diffusion rate'];
end
disp(yourtesthead)
disp(yourtest)

disp(' ')
fprintf('Estimation of raw D coefficient from MSD:\n')
fprintf('D = %.3g ± %.3g (mean ± std, N = %d)\n', ...
    Dmean, Dstd, sum(good_enough_fit));




% Retrieve instantaneous velocities, per track
 trackV = ma.getVelocities;

 % Pool track data together
 TV = vertcat( trackV{:} );

 % Velocities are returned in a N x (nDim+1) array: [ T Vx Vy ...]. So the
 % velocity vector in 2D is:
 V = TV(:, 2:3);

 % Compute diffusion coefficient
varV = var(V);
mVarV = mean(varV); % Take the mean of the two estimates
Dest = mVarV / 2 * dT;



Dheader2 = ['Scaling to model...'];
Dhead2 = ['    D        Dn        L'];
Ddat2 = [D Dn L];

disp(' ')
disp(Dheader2)
disp(Dhead2)
disp(Ddat2)
fprintf('Estimation from velocities histogram:\n')
fprintf('Tested D = %.3g %s, compare to scaled Des value of %.3g %s\n', ...
    Dest, [SPACE_UNITS '²/' TIME_UNITS], D, [SPACE_UNITS '²/' TIME_UNITS]);

% printf('D.psd target value was %.3g %s\n', ...
%     Dest, msdDpsd, [SPACE_UNITS '²/' TIME_UNITS]);

end



SI Fig. 3 - Title

Text Text Text


SI Fig. 4 - Title

Text Text Text


SI Fig. 5 - Title

Text Text Text