|
6 | 6 | "source": [ |
7 | 7 | "### RasCAL-1 to RAT\n", |
8 | 8 | "\n", |
9 | | - "RasCAL-1 (R1) project structs can be converted to RAT Project classes, and vice versa. This is done via the functions `r1_to_project_class` and `project_class_to_r1`.\n", |
| 9 | + "RasCAL-1 (R1) project structs can be converted to RAT Projects, and vice versa. This is done via the functions `r1_to_project` and `project_to_r1`.\n", |
10 | 10 | "\n", |
11 | 11 | "Converting from R1 to a `Project` is very simple. We use the example R1 project in the file `R1monolayerVolumeModel.mat`, which is a project for analysing a monolayer of DSPC with various deuterations (tail-deuterated, head-deuterated, fully deuterated, hydrogenated)" |
12 | 12 | ] |
|
15 | 15 | "cell_type": "markdown", |
16 | 16 | "metadata": {}, |
17 | 17 | "source": [ |
18 | | - "Simply give the file path to the function `r1_to_project_class`, and it returns a RAT `Project` that you can use exactly like any other." |
| 18 | + "Simply give the file path to the function `r1_to_project`, and it returns a RAT `Project` that you can use exactly like any other." |
19 | 19 | ] |
20 | 20 | }, |
21 | 21 | { |
|
24 | 24 | "metadata": {}, |
25 | 25 | "outputs": [], |
26 | 26 | "source": [ |
27 | | - "from RATapi.utils.convert import r1_to_project_class\n", |
| 27 | + "from RATapi.utils.convert import r1_to_project\n", |
28 | 28 | "\n", |
29 | | - "project = r1_to_project_class(\"R1monolayerVolumeModel.mat\")\n", |
| 29 | + "project = r1_to_project(\"R1monolayerVolumeModel.mat\")\n", |
30 | 30 | "print(project)" |
31 | 31 | ] |
32 | 32 | }, |
|
108 | 108 | "cell_type": "markdown", |
109 | 109 | "metadata": {}, |
110 | 110 | "source": [ |
111 | | - "`project_class_to_r1` takes parameters `project` and `filename`, which are the `Project` object and filename for the produced .mat file respectively. This .mat file can then be loaded into RasCAL-1.\n", |
| 111 | + "`project_to_r1` takes parameters `project` and `filename`, which are the `Project` object and filename for the produced .mat file respectively. This .mat file can then be loaded into RasCAL-1.\n", |
112 | 112 | "\n", |
113 | 113 | "Alternatively, if one sets `return_struct=True`, the struct is returned as a Python dictionary instead of being saved.\n", |
114 | 114 | "\n", |
|
121 | 121 | "metadata": {}, |
122 | 122 | "outputs": [], |
123 | 123 | "source": [ |
124 | | - "from RATapi.utils.convert import project_class_to_r1\n", |
| 124 | + "from RATapi.utils.convert import project_to_r1\n", |
125 | 125 | "from pprint import pp # for printing the struct\n", |
126 | 126 | "\n", |
127 | 127 | "# save to a file called lipid_bilayer.mat\n", |
128 | | - "project_class_to_r1(lipid_bilayer_project, filename=\"lipid_bilayer.mat\")\n", |
| 128 | + "project_to_r1(lipid_bilayer_project, filename=\"lipid_bilayer.mat\")\n", |
129 | 129 | "\n", |
130 | 130 | "# return as a Python dictionary\n", |
131 | | - "struct = project_class_to_r1(lipid_bilayer_project, return_struct=True)\n", |
| 131 | + "struct = project_to_r1(lipid_bilayer_project, return_struct=True)\n", |
132 | 132 | "pp(struct)" |
133 | 133 | ] |
134 | 134 | } |
|
0 commit comments