SDC — Strand Displacement Circuits¶
rgrow.sdc
¶
SDCParams
dataclass
¶
Holds all input parameters required to define an SDC system.
Attributes:
| Name | Type | Description |
|---|---|---|
k_f |
float
|
Forward reaction rate constant. |
temperature |
float
|
Initial simulation temperature in Celsius. |
glue_dg_s |
Mapping[str | tuple[str, str], tuple[float, float] | str]
|
Dictionary of glue strengths (ΔG, ΔS), indexed by name or tuple of names. |
scaffold |
list[str | None]
|
Ordered list of glue names representing the scaffold. |
strands |
list[SDCStrand]
|
List of all strands in solution. |
scaffold_concentration |
float
|
Effective molar concentration of the scaffold. |
k_n |
float
|
|
k_c |
float
|
|
junction_penalty_dg |
float | None
|
Optional ΔG penalty for forming junctions (in kcal/mol). |
junction_penalty_ds |
float | None
|
Optional ΔS penalty for forming junctions (in kcal/mol/K). |
Source code in rgrow-python/rgrow/sdc/sdc.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
SDC
¶
Bases: SDC
The actual SDC model
Attributes:
| Name | Type | Description |
|---|---|---|
params |
SDCParams
|
Parameters object used for initialization. |
name |
str
|
User-provided name of the system. |
Source code in rgrow-python/rgrow/sdc/sdc.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
run_anneal(anneal)
¶
" Given some Anneal, this will run the system on that anneal.
This will run the system on a standard square state, with no tracking.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
anneal
|
Anneal
|
|
required |
Returns:
| Type | Description |
|---|---|
AnnealOutputs
|
|
Source code in rgrow-python/rgrow/sdc/sdc.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
SDCStrand
dataclass
¶
Represents a strand that can bind to the scaffold in the SDC model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
concentration
|
float
|
Concentration of the strand (default is 1 μM = 1e-6 M). |
1e-06
|
left_glue
|
str or None
|
Glue name (or |
None
|
btm_glue
|
str or None
|
Identifier for the central domain of the strand (typically a base like 'A', 'B', etc.). |
None
|
right_glue
|
str or None
|
Glue name (or |
None
|
name
|
str or None
|
Human-readable identifier (e.g., compact code like "0A1"). |
None
|
color
|
str or None
|
Optional color for visualization or grouping. |
None
|
Source code in rgrow-python/rgrow/sdc/strand.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
basic_from_string(string_representation)
classmethod
¶
Given some simple string, generate a strand.
For example: - given "0A0", the strand with left glue 0*, right glue 0, and base A will be generated - given "-B-", the strand with no glue on the left and right, and base B will be generated
Source code in rgrow-python/rgrow/sdc/strand.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
pair_glue_from_string(string_representation)
classmethod
¶
Given some string, generate a strand.
This function will only work for simple systems (that is, small systems, with not-so high complexity), the input MUST be in the following format: f"{left_glue}{base_character}{right_glue}", where the left and right glue are either a number, or '-' if no glue is present, and the base_character is A, or B, ..., or Z.
Some valid strings would be "0A1", "1B1", "0K4", "-A1", "-E-"
Source code in rgrow-python/rgrow/sdc/strand.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |