diff --git a/examples/ITIC-gaff_typed.mol2 b/examples/ITIC-gaff_typed.mol2 new file mode 100644 index 0000000..0468561 --- /dev/null +++ b/examples/ITIC-gaff_typed.mol2 @@ -0,0 +1,397 @@ +@MOLECULE +***** + 186 200 1 0 0 +SMALL +dc + + +@ATOM + 1 C 13.781 1.773 0.210 ca 1 UNL 0.000000 + 2 C1 13.243 0.485 0.206 ca 1 UNL 0.000000 + 3 C2 11.865 0.305 0.150 ca 1 UNL 0.000000 + 4 H 13.905 -0.373 0.249 ha 1 UNL 0.000000 + 5 C3 11.065 1.434 0.100 ca 1 UNL 0.000000 + 6 H1 11.409 -0.679 0.147 ha 1 UNL 0.000000 + 7 C4 11.587 2.731 0.103 ca 1 UNL 0.000000 + 8 C5 12.971 2.906 0.158 ca 1 UNL 0.000000 + 9 H2 13.430 3.885 0.164 ha 1 UNL 0.000000 + 10 H3 14.857 1.902 0.256 ha 1 UNL 0.000000 + 11 C6 10.464 3.705 0.047 cc 1 UNL 0.000000 + 12 C7 9.217 2.924 0.012 cc 1 UNL 0.000000 + 13 C8 9.587 1.489 0.042 c 1 UNL 0.000000 + 14 O 8.841 0.528 0.025 o 1 UNL 0.000000 + 15 C9 10.612 5.067 0.034 cf 1 UNL 0.000000 + 16 C10 11.885 5.721 0.069 ch 1 UNL 0.000000 + 17 C11 9.521 5.992 -0.016 ch 1 UNL 0.000000 + 18 N 12.897 6.289 0.097 n1 1 UNL 0.000000 + 19 N1 8.652 6.761 -0.054 n1 1 UNL 0.000000 + 20 C12 7.948 3.424 -0.038 cf 1 UNL 0.000000 + 21 C13 6.647 2.837 -0.076 cd 1 UNL 0.000000 + 22 H4 7.865 4.505 -0.053 ha 1 UNL 0.000000 + 23 S 6.188 1.135 -0.076 ss 1 UNL 0.000000 + 24 C14 4.522 1.563 -0.141 cd 1 UNL 0.000000 + 25 C15 4.332 2.948 -0.161 cc 1 UNL 0.000000 + 26 C16 5.531 3.668 -0.126 cc 1 UNL 0.000000 + 27 H5 5.616 4.748 -0.136 ha 1 UNL 0.000000 + 28 C17 3.297 0.854 -0.157 cd 1 UNL 0.000000 + 29 S1 2.640 3.387 -0.213 ss 1 UNL 0.000000 + 30 C18 2.224 1.705 -0.196 cc 1 UNL 0.000000 + 31 C19 2.850 -0.596 -0.167 c3 1 UNL 0.000000 + 32 C20 1.326 -0.408 -0.203 ca 1 UNL 0.000000 + 33 C21 0.978 0.958 -0.210 ca 1 UNL 0.000000 + 34 C22 3.417 -1.263 -1.428 ca 1 UNL 0.000000 + 35 C23 3.213 -1.348 1.120 ca 1 UNL 0.000000 + 36 C24 3.183 -2.746 1.148 ca 1 UNL 0.000000 + 37 C25 3.431 -3.437 2.327 ca 1 UNL 0.000000 + 38 C26 3.716 -2.743 3.500 ca 1 UNL 0.000000 + 39 C27 3.748 -1.353 3.481 ca 1 UNL 0.000000 + 40 C28 4.725 -1.758 -1.415 ca 1 UNL 0.000000 + 41 C29 5.299 -2.278 -2.569 ca 1 UNL 0.000000 + 42 C30 4.574 -2.315 -3.756 ca 1 UNL 0.000000 + 43 C31 3.273 -1.823 -3.778 ca 1 UNL 0.000000 + 44 C32 2.700 -1.298 -2.624 ca 1 UNL 0.000000 + 45 C33 3.495 -0.661 2.300 ca 1 UNL 0.000000 + 46 H6 5.295 -1.750 -0.491 ha 1 UNL 0.000000 + 47 H7 3.972 -0.801 4.388 ha 1 UNL 0.000000 + 48 H8 3.516 0.424 2.302 ha 1 UNL 0.000000 + 49 H9 3.408 -4.523 2.328 ha 1 UNL 0.000000 + 50 H10 2.981 -3.296 0.234 ha 1 UNL 0.000000 + 51 H11 6.316 -2.654 -2.538 ha 1 UNL 0.000000 + 52 H12 2.699 -1.844 -4.699 ha 1 UNL 0.000000 + 53 H13 1.686 -0.913 -2.657 ha 1 UNL 0.000000 + 54 C34 3.999 -3.508 4.806 c3 1 UNL 0.000000 + 55 C35 5.468 -3.972 4.822 c3 1 UNL 0.000000 + 56 H14 3.819 -2.865 5.642 hc 1 UNL 0.000000 + 57 H15 3.355 -4.360 4.867 hc 1 UNL 0.000000 + 58 C36 5.733 -4.793 6.097 c3 1 UNL 0.000000 + 59 H16 6.112 -3.117 4.807 hc 1 UNL 0.000000 + 60 H17 5.660 -4.578 3.961 hc 1 UNL 0.000000 + 61 C37 7.203 -5.252 6.115 c3 1 UNL 0.000000 + 62 H18 5.538 -4.188 6.958 hc 1 UNL 0.000000 + 63 H19 5.092 -5.649 6.110 hc 1 UNL 0.000000 + 64 C38 7.448 -6.140 7.349 c3 1 UNL 0.000000 + 65 H20 7.844 -4.396 6.159 hc 1 UNL 0.000000 + 66 H21 7.414 -5.810 5.227 hc 1 UNL 0.000000 + 67 C39 8.925 -6.576 7.383 c3 1 UNL 0.000000 + 68 H22 7.218 -5.589 8.237 hc 1 UNL 0.000000 + 69 H23 6.822 -7.007 7.295 hc 1 UNL 0.000000 + 70 H24 9.550 -5.711 7.467 hc 1 UNL 0.000000 + 71 H25 9.088 -7.217 8.224 hc 1 UNL 0.000000 + 72 H26 9.163 -7.101 6.482 hc 1 UNL 0.000000 + 73 C40 5.207 -2.893 -5.036 c3 1 UNL 0.000000 + 74 C41 6.498 -3.649 -4.672 c3 1 UNL 0.000000 + 75 H27 4.518 -3.566 -5.501 hc 1 UNL 0.000000 + 76 H28 5.438 -2.096 -5.711 hc 1 UNL 0.000000 + 77 C42 7.015 -4.405 -5.910 c3 1 UNL 0.000000 + 78 H29 7.240 -2.952 -4.344 hc 1 UNL 0.000000 + 79 H30 6.294 -4.348 -3.888 hc 1 UNL 0.000000 + 80 C43 8.345 -5.103 -5.567 c3 1 UNL 0.000000 + 81 H31 7.173 -3.713 -6.711 hc 1 UNL 0.000000 + 82 H32 6.295 -5.138 -6.208 hc 1 UNL 0.000000 + 83 C44 8.784 -5.983 -6.752 c3 1 UNL 0.000000 + 84 H33 9.095 -4.366 -5.372 hc 1 UNL 0.000000 + 85 H34 8.212 -5.715 -4.699 hc 1 UNL 0.000000 + 86 C45 10.142 -6.634 -6.433 c3 1 UNL 0.000000 + 87 H35 8.876 -5.378 -7.630 hc 1 UNL 0.000000 + 88 H36 8.053 -6.746 -6.920 hc 1 UNL 0.000000 + 89 H37 10.419 -7.291 -7.231 hc 1 UNL 0.000000 + 90 H38 10.886 -5.872 -6.324 hc 1 UNL 0.000000 + 91 H39 10.066 -7.191 -5.522 hc 1 UNL 0.000000 + 92 C46 0.348 -1.386 -0.194 ca 1 UNL 0.000000 + 93 C47 -0.981 -0.966 -0.201 ca 1 UNL 0.000000 + 94 C48 -1.329 0.400 -0.205 ca 1 UNL 0.000000 + 95 C49 -0.350 1.379 -0.206 ca 1 UNL 0.000000 + 96 H40 0.607 -2.440 -0.173 ha 1 UNL 0.000000 + 97 H41 -0.609 2.433 -0.194 ha 1 UNL 0.000000 + 98 C50 -2.227 -1.712 -0.179 cd 1 UNL 0.000000 + 99 C51 -2.852 0.589 -0.170 c3 1 UNL 0.000000 + 100 C52 -3.299 -0.861 -0.147 cc 1 UNL 0.000000 + 101 S2 -2.643 -3.395 -0.181 ss 1 UNL 0.000000 + 102 C53 -4.334 -2.955 -0.131 cd 1 UNL 0.000000 + 103 C54 -4.524 -1.570 -0.124 cc 1 UNL 0.000000 + 104 C55 -3.214 1.353 1.111 ca 1 UNL 0.000000 + 105 C56 -3.421 1.245 -1.437 ca 1 UNL 0.000000 + 106 C57 -2.704 1.269 -2.633 ca 1 UNL 0.000000 + 107 C58 -3.278 1.783 -3.792 ca 1 UNL 0.000000 + 108 C59 -4.579 2.275 -3.773 ca 1 UNL 0.000000 + 109 C60 -5.303 2.250 -2.585 ca 1 UNL 0.000000 + 110 C61 -4.728 1.740 -1.427 ca 1 UNL 0.000000 + 111 C62 -3.496 0.676 2.297 ca 1 UNL 0.000000 + 112 C63 -3.748 1.379 3.472 ca 1 UNL 0.000000 + 113 C64 -3.716 2.769 3.478 ca 1 UNL 0.000000 + 114 C65 -3.431 3.453 2.299 ca 1 UNL 0.000000 + 115 C66 -3.184 2.750 1.126 ca 1 UNL 0.000000 + 116 C67 -3.998 3.545 4.777 c3 1 UNL 0.000000 + 117 C68 -5.454 4.048 4.769 c3 1 UNL 0.000000 + 118 H42 -3.848 2.900 5.618 hc 1 UNL 0.000000 + 119 H43 -3.332 4.380 4.846 hc 1 UNL 0.000000 + 120 C69 -5.722 4.865 6.047 c3 1 UNL 0.000000 + 121 H44 -6.120 3.212 4.734 hc 1 UNL 0.000000 + 122 H45 -5.612 4.667 3.911 hc 1 UNL 0.000000 + 123 C70 -7.181 5.358 6.045 c3 1 UNL 0.000000 + 124 H46 -5.555 4.248 6.906 hc 1 UNL 0.000000 + 125 H47 -5.061 5.706 6.078 hc 1 UNL 0.000000 + 126 C71 -7.423 6.249 7.277 c3 1 UNL 0.000000 + 127 H48 -7.841 4.517 6.077 hc 1 UNL 0.000000 + 128 H49 -7.365 5.922 5.155 hc 1 UNL 0.000000 + 129 C72 -8.892 6.712 7.295 c3 1 UNL 0.000000 + 130 H50 -7.214 5.692 8.167 hc 1 UNL 0.000000 + 131 H51 -6.781 7.103 7.232 hc 1 UNL 0.000000 + 132 H52 -9.534 5.859 7.373 hc 1 UNL 0.000000 + 133 H53 -9.053 7.357 8.133 hc 1 UNL 0.000000 + 134 H54 -9.110 7.240 6.391 hc 1 UNL 0.000000 + 135 C73 -5.213 2.842 -5.057 c3 1 UNL 0.000000 + 136 C74 -6.503 3.604 -4.700 c3 1 UNL 0.000000 + 137 H55 -4.524 3.510 -5.530 hc 1 UNL 0.000000 + 138 H56 -5.446 2.039 -5.725 hc 1 UNL 0.000000 + 139 C75 -7.020 4.349 -5.944 c3 1 UNL 0.000000 + 140 H57 -7.245 2.910 -4.365 hc 1 UNL 0.000000 + 141 H58 -6.297 4.309 -3.921 hc 1 UNL 0.000000 + 142 C76 -8.348 5.052 -5.605 c3 1 UNL 0.000000 + 143 H59 -7.179 3.650 -6.738 hc 1 UNL 0.000000 + 144 H60 -6.299 5.078 -6.249 hc 1 UNL 0.000000 + 145 C77 -8.789 5.918 -6.800 c3 1 UNL 0.000000 + 146 H61 -9.099 4.317 -5.402 hc 1 UNL 0.000000 + 147 H62 -8.214 5.673 -4.744 hc 1 UNL 0.000000 + 148 C78 -10.146 6.575 -6.484 c3 1 UNL 0.000000 + 149 H63 -8.884 5.304 -7.671 hc 1 UNL 0.000000 + 150 H64 -8.058 6.679 -6.978 hc 1 UNL 0.000000 + 151 H65 -10.424 7.224 -7.288 hc 1 UNL 0.000000 + 152 H66 -10.891 5.815 -6.366 hc 1 UNL 0.000000 + 153 H67 -10.067 7.141 -5.580 hc 1 UNL 0.000000 + 154 H68 -1.690 0.883 -2.664 ha 1 UNL 0.000000 + 155 H69 -2.705 1.796 -4.714 ha 1 UNL 0.000000 + 156 H70 -6.320 2.626 -2.556 ha 1 UNL 0.000000 + 157 H71 -5.297 1.740 -0.503 ha 1 UNL 0.000000 + 158 H72 -2.982 3.293 0.207 ha 1 UNL 0.000000 + 159 H73 -3.517 -0.409 2.308 ha 1 UNL 0.000000 + 160 H74 -3.408 4.538 2.290 ha 1 UNL 0.000000 + 161 H75 -3.972 0.835 4.383 ha 1 UNL 0.000000 + 162 S3 -6.190 -1.141 -0.062 ss 1 UNL 0.000000 + 163 C79 -6.649 -2.843 -0.046 cc 1 UNL 0.000000 + 164 C80 -5.534 -3.674 -0.090 cd 1 UNL 0.000000 + 165 H76 -5.619 -4.755 -0.090 ha 1 UNL 0.000000 + 166 C81 -7.950 -3.430 -0.002 ce 1 UNL 0.000000 + 167 C82 -9.219 -2.929 0.045 cd 1 UNL 0.000000 + 168 H77 -7.867 -4.511 -0.007 ha 1 UNL 0.000000 + 169 C83 -9.589 -1.494 0.062 c 1 UNL 0.000000 + 170 C84 -11.067 -1.439 0.120 ca 1 UNL 0.000000 + 171 C85 -11.589 -2.736 0.135 ca 1 UNL 0.000000 + 172 C86 -10.466 -3.710 0.088 cd 1 UNL 0.000000 + 173 O1 -8.843 -0.534 0.036 o 1 UNL 0.000000 + 174 C87 -10.614 -5.073 0.086 ce 1 UNL 0.000000 + 175 C88 -9.523 -5.998 0.044 cg 1 UNL 0.000000 + 176 C89 -11.887 -5.726 0.128 cg 1 UNL 0.000000 + 177 N2 -8.654 -6.767 0.012 n1 1 UNL 0.000000 + 178 N3 -12.899 -6.294 0.162 n1 1 UNL 0.000000 + 179 C90 -12.973 -2.911 0.193 ca 1 UNL 0.000000 + 180 C91 -13.783 -1.778 0.235 ca 1 UNL 0.000000 + 181 C92 -13.245 -0.490 0.220 ca 1 UNL 0.000000 + 182 C93 -11.867 -0.310 0.162 ca 1 UNL 0.000000 + 183 H78 -13.432 -3.889 0.208 ha 1 UNL 0.000000 + 184 H79 -14.859 -1.906 0.283 ha 1 UNL 0.000000 + 185 H80 -13.907 0.369 0.256 ha 1 UNL 0.000000 + 186 H81 -11.411 0.675 0.150 ha 1 UNL 0.000000 +@BOND + 1 1 2 ar + 2 2 3 ar + 3 2 4 1 + 4 3 5 ar + 5 3 6 1 + 6 5 7 ar + 7 7 8 ar + 8 8 1 ar + 9 8 9 1 + 10 1 10 1 + 11 7 11 1 + 12 11 12 1 + 13 12 13 1 + 14 13 5 1 + 15 13 14 2 + 16 11 15 2 + 17 15 16 1 + 18 15 17 1 + 19 18 16 3 + 20 19 17 3 + 21 12 20 2 + 22 20 21 1 + 23 20 22 1 + 24 21 23 1 + 25 23 24 1 + 26 24 25 2 + 27 21 26 2 + 28 26 25 1 + 29 26 27 1 + 30 24 28 1 + 31 25 29 1 + 32 29 30 1 + 33 28 30 2 + 34 28 31 1 + 35 31 32 1 + 36 30 33 1 + 37 32 33 ar + 38 31 34 1 + 39 31 35 1 + 40 35 36 ar + 41 36 37 ar + 42 37 38 ar + 43 38 39 ar + 44 34 40 ar + 45 40 41 ar + 46 41 42 ar + 47 42 43 ar + 48 43 44 ar + 49 44 34 ar + 50 39 45 ar + 51 45 35 ar + 52 40 46 1 + 53 39 47 1 + 54 45 48 1 + 55 37 49 1 + 56 36 50 1 + 57 41 51 1 + 58 43 52 1 + 59 44 53 1 + 60 38 54 1 + 61 54 55 1 + 62 54 56 1 + 63 54 57 1 + 64 55 58 1 + 65 55 59 1 + 66 55 60 1 + 67 58 61 1 + 68 58 62 1 + 69 58 63 1 + 70 61 64 1 + 71 61 65 1 + 72 61 66 1 + 73 64 67 1 + 74 64 68 1 + 75 64 69 1 + 76 67 70 1 + 77 67 71 1 + 78 67 72 1 + 79 42 73 1 + 80 73 74 1 + 81 73 75 1 + 82 73 76 1 + 83 74 77 1 + 84 74 78 1 + 85 74 79 1 + 86 77 80 1 + 87 77 81 1 + 88 77 82 1 + 89 80 83 1 + 90 80 84 1 + 91 80 85 1 + 92 83 86 1 + 93 83 87 1 + 94 83 88 1 + 95 86 89 1 + 96 86 90 1 + 97 86 91 1 + 98 32 92 ar + 99 92 93 ar + 100 93 94 ar + 101 94 95 ar + 102 95 33 ar + 103 92 96 1 + 104 95 97 1 + 105 93 98 1 + 106 94 99 1 + 107 99 100 1 + 108 100 98 2 + 109 98 101 1 + 110 101 102 1 + 111 102 103 2 + 112 100 103 1 + 113 99 104 1 + 114 99 105 1 + 115 105 106 ar + 116 106 107 ar + 117 107 108 ar + 118 108 109 ar + 119 109 110 ar + 120 110 105 ar + 121 104 111 ar + 122 111 112 ar + 123 112 113 ar + 124 113 114 ar + 125 114 115 ar + 126 115 104 ar + 127 113 116 1 + 128 116 117 1 + 129 116 118 1 + 130 116 119 1 + 131 117 120 1 + 132 117 121 1 + 133 117 122 1 + 134 120 123 1 + 135 120 124 1 + 136 120 125 1 + 137 123 126 1 + 138 123 127 1 + 139 123 128 1 + 140 126 129 1 + 141 126 130 1 + 142 126 131 1 + 143 129 132 1 + 144 129 133 1 + 145 129 134 1 + 146 108 135 1 + 147 135 136 1 + 148 135 137 1 + 149 135 138 1 + 150 136 139 1 + 151 136 140 1 + 152 136 141 1 + 153 139 142 1 + 154 139 143 1 + 155 139 144 1 + 156 142 145 1 + 157 142 146 1 + 158 142 147 1 + 159 145 148 1 + 160 145 149 1 + 161 145 150 1 + 162 148 151 1 + 163 148 152 1 + 164 148 153 1 + 165 106 154 1 + 166 107 155 1 + 167 109 156 1 + 168 110 157 1 + 169 115 158 1 + 170 111 159 1 + 171 112 161 1 + 172 114 160 1 + 173 103 162 1 + 174 162 163 1 + 175 163 164 2 + 176 164 102 1 + 177 164 165 1 + 178 163 166 1 + 179 166 167 2 + 180 166 168 1 + 181 167 169 1 + 182 169 170 1 + 183 170 171 ar + 184 171 172 1 + 185 172 167 1 + 186 173 169 2 + 187 172 174 2 + 188 174 175 1 + 189 174 176 1 + 190 177 175 3 + 191 178 176 3 + 192 171 179 ar + 193 179 180 ar + 194 180 181 ar + 195 181 182 ar + 196 182 170 ar + 197 179 183 1 + 198 180 184 1 + 199 181 185 1 + 200 182 186 1 +@SUBSTRUCTURE + 1 UNL 1 TEMP 0 **** **** 0 ROOT diff --git a/examples/environment-ex.yml b/examples/environment-ex.yml index 25fda5e..fef19bc 100644 --- a/examples/environment-ex.yml +++ b/examples/environment-ex.yml @@ -9,16 +9,18 @@ dependencies: - gsd=2.4.2 - h5py=2.10 - hdf5=1.10 +- ipython=7.10.0 +- jupyterlab=3.0.9 - matplotlib=3.4.2 +- mbuild=0.13.1 +- nodejs>=10 - numpy=1.21 - openbabel=3.1.1 - pip=21.0.1 +- py3dmol=0.8.0 - python=3.7 +- rdkit - scipy=1.7 -- ipython=7.10.0 -- jupyterlab=3.0.9 -- mbuild=0.11.0 -- nodejs>=10 -- py3dmol=0.8.0 - pip: - pyscf==1.7 + - git+https://github.com/cmelab/grits diff --git a/examples/itic_trajectory.gsd b/examples/itic_trajectory.gsd new file mode 100644 index 0000000..83c9dc7 Binary files /dev/null and b/examples/itic_trajectory.gsd differ diff --git a/examples/workflow-itic.ipynb b/examples/workflow-itic.ipynb index 0776bfd..9e719ad 100644 --- a/examples/workflow-itic.ipynb +++ b/examples/workflow-itic.ipynb @@ -2,8 +2,10 @@ "cells": [ { "cell_type": "markdown", - "id": "strategic-arrest", - "metadata": {}, + "id": "ed822352", + "metadata": { + "tags": [] + }, "source": [ "# MorphCT Example Workflow\n", "\n", @@ -15,7 +17,7 @@ }, { "cell_type": "markdown", - "id": "charged-cable", + "id": "071063bc", "metadata": {}, "source": [ "First let's import necessary modules:" @@ -23,102 +25,327 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "compliant-terminal", + "execution_count": 2, + "id": "387f73ee", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/jenny/miniconda3/envs/morphct-ex/lib/python3.7/site-packages/h5py/__init__.py:46: DeprecationWarning: `np.typeDict` is a deprecated alias for `np.sctypeDict`.\n", + " from ._conv import register_converters as _register_converters\n" + ] + } + ], "source": [ "import numpy as np\n", "\n", + "import mbuild as mb\n", + "from grits import CG_System, CG_Compound\n", + "\n", "from morphct.system import System\n", "from morphct.chromophores import amber_dict" ] }, { - "cell_type": "markdown", - "id": "collectible-complexity", + "cell_type": "code", + "execution_count": 4, + "id": "d19731c7", "metadata": {}, + "outputs": [ + { + "data": { + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", + "text/html": [ + "
\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + " jupyter labextension install jupyterlab_3dmol

\n", + "
\n", + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", + "text/html": [ + "
\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + " jupyter labextension install jupyterlab_3dmol

\n", + "
\n", + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", + "text/html": [ + "
\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + " jupyter labextension install jupyterlab_3dmol

\n", + "
\n", + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ - "In the cell below, we'll create a system object for morphct. This the main class that will hold all the information for our simulation. We'll need to give it a gsd file, path to an output directory, the frame of the gsd file to use, the scaling factor to convert the lengths in the gsd to Angstroms, and a dictionary to map particle types to elements. Here's our starting structure, an atomistic (not coarse-grain or united atom) gsd file with 10 ITIC molecules:" + "# This part of the backbone will work\n", + "itic_backbone = \"c1c4c(cc2c1Cc3c2sc7c3scc7)Cc5c4sc6c5scc6\"\n", + "backbone = mb.load(itic_backbone, smiles=True)\n", + "backbone.visualize().show()\n", + "\n", + "itic_fullbackbone = \"c1c4c(cc2c1Cc3c2sc7c3sc(C=C1C(=C(C#N)C#N)c2ccccc2C1(=O))c7)Cc5c4sc6c5sc(C=C1C(=C(C#N)C#N)c2ccccc2C1(=O))c6\"\n", + "fullbackbone = mb.load(itic_fullbackbone, smiles=True)\n", + "fullbackbone.visualize().show()\n", + "\n", + "# This part is the misbehaving bit\n", + "itic_end = \"C=C1C(=C(C#N)C#N)c2ccccc2C1(=O)\"\n", + "end = mb.load(itic_end, smiles=True)\n", + "end.visualize().show()" ] }, { "cell_type": "code", - "execution_count": null, - "id": "alive-spending", + "execution_count": 7, + "id": "b75802f0", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/jenny/miniconda3/envs/morphct-ex/lib/python3.7/site-packages/grits/coarsegrain.py:169: UserWarning: Some atoms have been left out of coarse-graining!\n", + " warn(\"Some atoms have been left out of coarse-graining!\")\n" + ] + } + ], "source": [ - "gsdfile = \"itic-trajectory.gsd\"\n", + "# This cell is proof that GRiTS can work on a single itic\n", + "itic_single = mb.load(\"ITIC-gaff_typed.mol2\")\n", "\n", - "system = System(gsdfile, \"output_itic\", frame=-1, scale=3.5636, conversion_dict=amber_dict)\n", - "system.visualize_system()" + "for p in itic_single:\n", + " p.name = p[0]\n", + " \n", + "cg_itic = CG_Compound(itic_single, beads={\"_B\": itic_fullbackbone})" ] }, { "cell_type": "markdown", - "id": "brave-recognition", + "id": "ebd48b26", "metadata": {}, "source": [ - "Next we need to pick the chromophores. This is the most time-consuming part. We provide a function, `morphct.chromophores.get_chromo_ids_smiles`, that can be used to pick chromophores using SMILES strings (see p3ht example), but for this molecule it's difficult to use SMILES, so instead we specify the indices manually." + "In the cell below, we'll create a system object for morphct. This the main class that will hold all the information for our simulation. We'll need to give it a gsd file, path to an output directory, the frame of the gsd file to use, the scaling factor to convert the lengths in the gsd to Angstroms, and a dictionary to map particle types to elements. Here's our starting structure, an atomistic (not coarse-grain or united atom) gsd file with 10 ITIC molecules:" ] }, { "cell_type": "code", - "execution_count": null, - "id": "occasional-chocolate", + "execution_count": 8, + "id": "2477dfb3", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", + "text/html": [ + "
\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + " jupyter labextension install jupyterlab_3dmol

\n", + "
\n", + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ - "# the indices of the acceptor in one molecule\n", - "a_inds = [np.arange(19), np.hstack((np.array([166]), np.arange(168,186)))]\n", - "\n", - "#the indices of the donor in one molecule\n", - "d_inds = np.hstack(\n", - " (np.array([20]), np.arange(22,33),np.arange(91,103),np.arange(161,165))\n", - ")\n", + "gsdfile = \"itic_trajectory.gsd\"\n", "\n", - "mol_length = 186\n", - "n_mols = 10\n", - "\n", - "ac_inds = [\n", - " item for sublist in \n", - " [(a_inds[0] + i * mol_length, a_inds[1] + i * mol_length) for i in range(n_mols)]\n", - " for item in sublist\n", - "]\n", - "\n", - "do_inds = [d_inds + i * mol_length for i in range(n_mols)]" + "system = System(gsdfile, \"output_itic\", frame=-1, scale=3.5636, conversion_dict=amber_dict)\n", + "system.visualize_system()" + ] + }, + { + "cell_type": "markdown", + "id": "5b5eee61", + "metadata": {}, + "source": [ + "Next we need to pick the chromophores. We'll use GRiTS, as in the P3HT workflow." ] }, { "cell_type": "code", - "execution_count": null, - "id": "german-internet", + "execution_count": 10, + "id": "3546f63e", "metadata": {}, "outputs": [], "source": [ - "# acceptor and donor combined\n", - "all_inds = np.hstack(\n", - " (np.arange(33), np.arange(91,103), np.arange(161,186))\n", - ")" + "# But this is still not working on the gsdfile :/\n", + "cg_system = CG_System(gsdfile, beads={\"_B\": itic_fullbackbone}, conversion_dict=amber_dict)" ] }, { "cell_type": "code", - "execution_count": null, - "id": "effective-internet", + "execution_count": 5, + "id": "3595d5bd", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "{}" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ - "# saving the indices for use in morphct-flow\n", - "np.savetxt(\"itic_a_ids.csv\", a_inds, fmt=\"%i\")\n", - "np.savetxt(\"itic_d_ids.csv\", d_inds, fmt=\"%i\")\n", - "np.savetxt(\"itic_all_ids.csv\", all_inds, fmt=\"%i\")" + "# the mapping is still empty :(\n", + "cg_system.mapping" ] }, { "cell_type": "markdown", - "id": "parallel-canvas", + "id": "fec3c614", "metadata": {}, "source": [ "Next let's add these chromophores to the system and visualize them. The acceptors will be colored dark red and the donors will be colored purple.\n", @@ -128,17 +355,27 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "published-blend", + "execution_count": 6, + "id": "0c7ad563", "metadata": {}, - "outputs": [], + "outputs": [ + { + "ename": "KeyError", + "evalue": "'_B...c1c4c(cc2c1Cc3c2scc3)Cc5c4scc5'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m system.add_chromophores(\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mcg_system\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmapping\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'_B...c1c4c(cc2c1Cc3c2scc3)Cc5c4scc5'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;34m\"acceptor\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mchromophore_kwargs\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m\"reorganization_energy\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;36m0.15\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m )\n", + "\u001b[0;31mKeyError\u001b[0m: '_B...c1c4c(cc2c1Cc3c2scc3)Cc5c4scc5'" + ] + } + ], "source": [ "system.add_chromophores(\n", - " ac_inds, \"acceptor\", chromophore_kwargs={\"charge\": -1, \"reorganization_energy\": 0.15}\n", - ")\n", - "\n", - "system.add_chromophores(\n", - " do_inds, \"donor\", chromophore_kwargs={\"reorganization_energy\" : 0.15}\n", + " cg_system.mapping[f'_B...{itic_backbone}'], \n", + " \"acceptor\", \n", + " chromophore_kwargs={\"reorganization_energy\": 0.15}\n", ")\n", "\n", "system.visualize_chromophores()" @@ -146,7 +383,7 @@ }, { "cell_type": "markdown", - "id": "social-reservoir", + "id": "0d2f3578", "metadata": {}, "source": [ "Next let's compute the energies required to run the KMC simulation. First, the neighbors will be calculated (using voronoi analysis) and then the single and dimer energies will be calculated and saved to a file. (So that the simulation can be restarted from this point more easily.)" @@ -155,7 +392,7 @@ { "cell_type": "code", "execution_count": null, - "id": "pointed-assist", + "id": "13abbd96", "metadata": {}, "outputs": [], "source": [ @@ -164,7 +401,7 @@ }, { "cell_type": "markdown", - "id": "infectious-affect", + "id": "e473ac41", "metadata": {}, "source": [ "We can check that the pair and singles inputs look reasonable. There won't be any bonds and hydrogen atoms should've been added." @@ -173,7 +410,7 @@ { "cell_type": "code", "execution_count": null, - "id": "equipped-adoption", + "id": "98fae296", "metadata": {}, "outputs": [], "source": [ @@ -188,7 +425,7 @@ }, { "cell_type": "markdown", - "id": "elder-distributor", + "id": "86429286", "metadata": {}, "source": [ "Once the energy files are finished, we can use them to set the energy values of the chromophores . (This can also be run to restart the calculation from this point.)" @@ -197,7 +434,7 @@ { "cell_type": "code", "execution_count": null, - "id": "english-windsor", + "id": "941a493d", "metadata": {}, "outputs": [], "source": [ @@ -206,7 +443,7 @@ }, { "cell_type": "markdown", - "id": "exciting-check", + "id": "71ef5f39", "metadata": {}, "source": [ "This function sets the `homo_1`, `homo`, `lumo`, `lumo_1`, `neighbors_delta_e`, and `neighbors_ti` attribute of each chromphore:" @@ -215,7 +452,7 @@ { "cell_type": "code", "execution_count": null, - "id": "active-porcelain", + "id": "32ac51bd", "metadata": {}, "outputs": [], "source": [ @@ -233,7 +470,7 @@ }, { "cell_type": "markdown", - "id": "composite-society", + "id": "266a0b1f", "metadata": {}, "source": [ "With all the energy values set, we're ready to run KMC! We need to set the temperature that the KMC simulation will be run at and the lifetimes and numbers of our carriers:" @@ -242,7 +479,7 @@ { "cell_type": "code", "execution_count": null, - "id": "anticipated-marking", + "id": "5a737b58", "metadata": {}, "outputs": [], "source": [ @@ -253,7 +490,7 @@ }, { "cell_type": "markdown", - "id": "controversial-teddy", + "id": "027a828d", "metadata": {}, "source": [ "The output files for each process are saved in `output_itic/kmc/kmc_PROC#.log` (where `PROC#` is whatever process number the job was run on) and analysis plots will be saved in `output_itic/kmc/figures/`." @@ -262,7 +499,7 @@ { "cell_type": "code", "execution_count": null, - "id": "satellite-watch", + "id": "b2c2dcc1", "metadata": {}, "outputs": [], "source": [ diff --git a/examples/workflow-p3ht.ipynb b/examples/workflow-p3ht.ipynb index 6c9cd74..b9d51c8 100644 --- a/examples/workflow-p3ht.ipynb +++ b/examples/workflow-p3ht.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "digital-chambers", + "id": "91bd0fa9", "metadata": {}, "source": [ "# MorphCT Example Workflow\n", @@ -15,7 +15,7 @@ }, { "cell_type": "markdown", - "id": "ordinary-wrestling", + "id": "960ea0f5", "metadata": {}, "source": [ "First let's import necessary modules:" @@ -23,21 +23,32 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "attached-spain", + "execution_count": 1, + "id": "b0197204", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/jenny/miniconda3/envs/morphct/lib/python3.7/site-packages/h5py/__init__.py:46: DeprecationWarning: `np.typeDict` is a deprecated alias for `np.sctypeDict`.\n", + " from ._conv import register_converters as _register_converters\n" + ] + } + ], "source": [ "import gsd.hoomd\n", "import numpy as np\n", "\n", + "from grits import CG_System\n", + "\n", "from morphct.chromophores import amber_dict, get_chromo_ids_smiles\n", "from morphct.system import System" ] }, { "cell_type": "markdown", - "id": "structural-spoke", + "id": "a278fc1f", "metadata": {}, "source": [ "In the cell below, we'll create a system object for morphct. This the main class that will hold all the information for our simulation. We'll need to give it a gsd file, path to an output directory, the frame of the gsd file to use, the scaling factor to convert the lengths in the gsd to Angstroms, and a dictionary to map particle types to elements. Here's our starting structure, an atomistic (not coarse-grain or united atom) gsd file with 2 p3ht 16-mers: " @@ -45,10 +56,58 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "heavy-probability", + "execution_count": 2, + "id": "23e9205d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", + "text/html": [ + "
\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + " jupyter labextension install jupyterlab_3dmol

\n", + "
\n", + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "gsdfile = \"p3ht-trajectory.gsd\"\n", "\n", @@ -58,32 +117,39 @@ }, { "cell_type": "markdown", - "id": "roman-bread", + "id": "2e2cae92", "metadata": {}, "source": [ - "Next let's use SMARTS matching to detect our chromophores. This SMARTS string shown below is for p3ht. \n", - "\n", - "Note: The positions/orientations in the final frame of the gsd file are not optimal, so we are using the first frame (before any distortion) for SMARTS matching and then mapping those indices to the final structure. Sometimes SMARTS matching is not the best method to find the chromophores--check the ITIC example to see another method." + "Next let's use [GRiTS](https://github.com/cmelab/grits), a coarse-graining tool which can find instances of chemical moieties in a trajectory using [SMARTS grammar](https://www.daylight.com/dayhtml/doc/theory/theory.smarts.html), to get a mapping of the indices of our chromophores. For more about how GRiTS works, check out [the documentation](https://grits.readthedocs.io/en/latest/). We're going to use the SMARTS representation of thiophene to find all instances of thiophene in our trajectory." ] }, { "cell_type": "code", - "execution_count": null, - "id": "neural-innocent", + "execution_count": 3, + "id": "01ac1f72", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/jenny/Projects/grits/grits/coarsegrain.py:169: UserWarning: Some atoms have been left out of coarse-graining!\n", + " warn(\"Some atoms have been left out of coarse-graining!\")\n" + ] + } + ], "source": [ - "smarts_str = \"c1cscc1CCCCCC\"\n", + "smarts_str = \"c1cscc1\"\n", "\n", "with gsd.hoomd.open(gsdfile) as f:\n", " snap0 = f[0]\n", "\n", - "aaids = get_chromo_ids_smiles(snap0, smarts_str, system.conversion_dict)" + "cg_system = CG_System(gsdfile, beads={\"_B\":smarts_str}, conversion_dict=amber_dict)" ] }, { "cell_type": "markdown", - "id": "annoying-franchise", + "id": "3a8cb16a", "metadata": {}, "source": [ "Next let's add these chromophores to the system and visualize them. We only have donor species in this system, and they'll be colored purple." @@ -91,31 +157,67 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "wireless-revelation", - "metadata": {}, - "outputs": [], - "source": [ - "# the indices of the donor in one molecule\n", - "# saved for use in morphct-flow\n", - "np.savetxt(\"p3ht_d_ids.csv\", aaids[:16], fmt=\"%i\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "northern-mambo", + "execution_count": 4, + "id": "143cfbb9", "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", + "text/html": [ + "
\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + " jupyter labextension install jupyterlab_3dmol

\n", + "
\n", + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ - "system.add_chromophores(aaids, \"donor\")\n", + "system.add_chromophores(cg_system.mapping[\"_B...c1cscc1\"], \"donor\")\n", "\n", "system.visualize_chromophores()" ] }, { "cell_type": "markdown", - "id": "heated-warehouse", + "id": "954ce67e", "metadata": {}, "source": [ "Next let's compute the energies required to run the KMC simulation. First, the neighbors will be calculated (using voronoi analysis) and then the single and dimer energies will be calculated and saved to a file. (So that the simulation can be restarted from this point more easily.)" @@ -123,17 +225,29 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "forbidden-keyboard", + "execution_count": 5, + "id": "fbf2ffd7", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "There are 212 chromophore pairs\n", + "Starting singles energy calculation...\n", + "Finished in 11.76 s. Output written to output_p3ht/singles_energies.txt.\n", + "Starting dimer energy calculation...\n", + "Finished in 22.04 s. Output written to output_p3ht/dimer_energies.txt.\n" + ] + } + ], "source": [ "system.compute_energies()" ] }, { "cell_type": "markdown", - "id": "removed-advertiser", + "id": "c645ef40", "metadata": {}, "source": [ "We can check that the pair and singles inputs look reasonable. There won't be any bonds and hydrogen atoms should've been added." @@ -141,10 +255,119 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "exempt-ranking", + "execution_count": 6, + "id": "6ccd2ab6", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pair #86:\n" + ] + }, + { + "data": { + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", + "text/html": [ + "
\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + " jupyter labextension install jupyterlab_3dmol

\n", + "
\n", + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Single #0:\n" + ] + }, + { + "data": { + "application/3dmoljs_load.v0": "
\n

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol

\n
\n", + "text/html": [ + "
\n", + "

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n", + " jupyter labextension install jupyterlab_3dmol

\n", + "
\n", + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "i = 86 # try any number from 0 to 191\n", "print(f\"Pair #{i}:\")\n", @@ -157,7 +380,7 @@ }, { "cell_type": "markdown", - "id": "blond-adelaide", + "id": "7fda3d71", "metadata": {}, "source": [ "Once the energy files are finished, we can use them to set the energy values of the chromophores . (This can also be run to restart the calculation from this point.)" @@ -165,17 +388,25 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "compliant-litigation", + "execution_count": 7, + "id": "e3da78d3", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Energies set.\n" + ] + } + ], "source": [ "system.set_energies()" ] }, { "cell_type": "markdown", - "id": "optimum-hanging", + "id": "942e500e", "metadata": {}, "source": [ "This function sets the `homo_1`, `homo`, `lumo`, `lumo_1`, `neighbors_delta_e`, and `neighbors_ti` attributes of each chromphore:" @@ -183,10 +414,22 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "subsequent-violation", + "execution_count": 8, + "id": "2dd5c726", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Chromophore 0:\n", + "HOMO-1: -9.06 HOMO: -8.61 LUMO: 0.58 LUMO+1: 0.62\n", + "18 neighbors\n", + "DeltaE of first neighbor: 0.003\n", + "Transfer integral of first neighbor: 0.654\n" + ] + } + ], "source": [ "i = 0\n", "chromo = system.chromophores[i]\n", @@ -202,7 +445,7 @@ }, { "cell_type": "markdown", - "id": "generic-debut", + "id": "4952aac7", "metadata": {}, "source": [ "With all the energy values set, we're ready to run KMC! We need to set the temperature that the KMC simulation will be run at and the lifetimes and numbers of our carriers:" @@ -210,10 +453,84 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "random-result", + "execution_count": 9, + "id": "c829cd70", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "All KMC jobs completed!\n", + "Combining outputs...\n", + "---------- KMC_ANALYZE ----------\n", + "All figures saved in output_p3ht/kmc/figures\n", + "---------------------------------\n", + "Considering the transport of hole...\n", + "Obtaining mean squared displacements...\n", + "\tNotice: The data from 17 carriers were\n", + "\tdiscarded due to the carrier lifetime being more than double\n", + "\t(or less than half of) the specified carrier lifetime.\n", + "Plotting distribution of hole displacements\n", + "\tFigure saved as hole_displacement_dist.png\n", + "Calculating mobility...\n", + "\tStandard Error 2.1429489585092286e-08\n", + "\tFitting r_val = 0.9971684613976207\n", + "\tFigure saved as lin_MSD_hole.png\n", + "\tFigure saved as semi_log_MSD_hole.png\n", + "\tFigure saved as log_MSD_hole.png\n", + "\t----------------------------------------\n", + "\tHole mobility = 2.59E-02 +/- 2.14E-03 cm^2 V^-1 s^-1\n", + "\t----------------------------------------\n", + "Calculating hole trajectory anisotropy...\n", + "\t----------------------------------------\n", + "\tHole charge transport anisotropy: 0.407\n", + "\t----------------------------------------\n", + "Plotting hole hop frequency distribution...\n", + "\tDYNAMIC CUT\n", + "\tNotice: No minima found in distribution. Cutoff set to None.\n", + "\tCluster cut-off based on hop frequency set to None\n", + "\tFigure saved as total_hop_freq_hole.png\n", + "Plotting hole net hop frequency distribution...\n", + "\tFigure saved as net_hop_freq_hole.png\n", + "Plotting (total - net hops) discrepancy distribution...\n", + "\tThere are 9 paths with one-way transport.\n", + "\tThere are 18 paths with total - net < 10.\n", + "\tFigure saved as hop_discrepancy_hole.png\n", + "Determining molecule IDs...\n", + "Donor HOMO Level = -8.362 +/- 0.035\n", + "Donor Delta E_ij mean = 0.000 +/- 0.014\n", + "\tFigure saved as donor_delta_E_ij.png\n", + "\tNotice: No minima found in distribution. Cutoff set to None.\n", + "Neighbor histogram figure saved as neighbor_hist_donor.png\n", + "\tNotice: No minima found in distribution. Cutoff set to None.\n", + "Orientation histogram figure saved as orientation_hist_donor.png\n", + "\tNotice: No minima found in distribution. Cutoff set to None.\n", + "\tFigure saved as donor_transfer_integral_mols.png\n", + "Examining the donor material...\n", + "Calculating clusters...\n", + "\tNo cutoff provided: cluster cutoff set to 19.122\n", + "\t----------------------------------------\n", + "\tDonor: Detected 1 total\n", + "\tand 1 large clusters (size > 6).\n", + "\tLargest cluster size: 32 chromophores.\n", + "\tRatio in \"large\" clusters: 1.00\n", + "\t----------------------------------------\n", + "Examining the acceptor material...\n", + "\tNo material found. Continuing...\n", + "Mean intra-cluster donor rate: 8.094e+14+/-2.177e+13\n", + "\tFigure saved as donor_hopping_rate_clusters.png\n", + "\tFigure saved as donor_transfer_integral_clusters.png\n", + "Mean intra-molecular donor rate: 1.212e+15+/-3.907e+13\n", + "Mean inter-molecular donor rate: 3.384e+12+/-1.961e+11\n", + "\tFigure saved as donor_hopping_rate_clusters.png\n", + "Plotting cluster size distribution...\n", + "\tFigure saved as donor_cluster_dist.png\n", + "Writing CSV Output File...\n", + "\tCSV file written to output_p3ht/kmc/results.csv\n" + ] + } + ], "source": [ "lifetimes = [1e-14, 1e-13, 1e-12, 1e-11]\n", "temp = 300\n", @@ -222,7 +539,7 @@ }, { "cell_type": "markdown", - "id": "knowing-mustang", + "id": "75317b7a", "metadata": {}, "source": [ "The output files for each process are saved in `output_p3ht/kmc/kmc_PROC#.log` (where `PROC#` is whatever process number the job was run on) and analysis plots will be saved in `output_p3ht/kmc/figures/`." @@ -230,10 +547,49 @@ }, { "cell_type": "code", - "execution_count": null, - "id": "inner-appendix", + "execution_count": 10, + "id": "85915198", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Found 10 jobs to run\n", + " starting job 0\n", + " \thole hopped 0 times over 0.00e+00 seconds into image [0 0 0] for a displacement of\n", + " \t0.00 (took walltime 0.01 seconds)\n", + " starting job 1\n", + " \thole hopped 34 times over 9.70e-14 seconds into image [0 0 0] for a displacement of\n", + " \t7.83 (took walltime 0.10 seconds)\n", + " starting job 2\n", + " \thole hopped 9 times over 9.40e-14 seconds into image [0 0 0] for a displacement of\n", + " \t3.99 (took walltime 0.02 seconds)\n", + " starting job 3\n", + " \thole hopped 2 times over 3.11e-13 seconds into image [0 0 0] for a displacement of\n", + " \t3.92 (took walltime 0.00 seconds)\n", + " starting job 4\n", + " \thole hopped 0 times over 0.00e+00 seconds into image [0 0 0] for a displacement of\n", + " \t0.00 (took walltime 0.00 seconds)\n", + " starting job 5\n", + " \thole hopped 5 times over 5.16e-14 seconds into image [0 0 0] for a displacement of\n", + " \t10.18 (took walltime 0.03 seconds)\n", + " starting job 6\n", + " \thole hopped 3 times over 3.90e-12 seconds into image [0 0 0] for a displacement of\n", + " \t13.53 (took walltime 0.01 seconds)\n", + " starting job 7\n", + " \thole hopped 671 times over 1.00e-12 seconds into image [0 0 0] for a displacement of\n", + " \t4.03 (took walltime 1.42 seconds)\n", + " starting job 8\n", + " \thole hopped 3 times over 1.60e-12 seconds into image [0 0 0] for a displacement of\n", + " \t3.92 (took walltime 0.00 seconds)\n", + " starting job 9\n", + " \thole hopped 0 times over 0.00e+00 seconds into image [0 0 0] for a displacement of\n", + " \t0.00 (took walltime 0.00 seconds)\n", + "\n" + ] + } + ], "source": [ "with open(\"output_p3ht/kmc/kmc_00.log\", \"r\") as f:\n", " lines = f.readlines()\n", @@ -243,7 +599,7 @@ { "cell_type": "code", "execution_count": null, - "id": "authorized-mandate", + "id": "f12ecef8", "metadata": {}, "outputs": [], "source": []