setup
#
Setup systems ready for calculations.
Functions:
-
setup_system
–Generate a set of molecule coordinate by using the PACKMOL package.
setup_system
#
setup_system(
components: list[tuple[str, int]],
box_target_density: Quantity = 0.95 * _G_PER_ML,
box_scale_factor: float = 1.1,
box_padding: Quantity = 2.0 * angstrom,
tolerance: Quantity = 2.0 * angstrom,
) -> tuple[Topology, Quantity]
Generate a set of molecule coordinate by using the PACKMOL package.
Parameters:
-
components
(list[tuple[str, int]]
) –A list of the form
components[i] = (smiles_i, count_i)
wheresmiles_i
is the SMILES representation of componenti
andcount_i
is the number of corresponding instances of that component to create.If any SMILES is fully indexed an attempt will be made to create components with the same atom ordering as the indices.
-
box_target_density
(Quantity
, default:0.95 * _G_PER_ML
) –Target mass density when approximating the box size for the final system with units compatible with g / mL.
-
box_scale_factor
(float
, default:1.1
) –The amount to scale the approximate box size by.
-
box_padding
(Quantity
, default:2.0 * angstrom
) –The amount of extra padding to add to the box size to avoid PBC issues in units compatible with angstroms.
-
tolerance
(Quantity
, default:2.0 * angstrom
) –The minimum spacing between molecules during packing in units compatible with angstroms.
Returns:
-
tuple[Topology, Quantity]
–A topology containing the molecules the coordinates were generated for and a unit [A] wrapped numpy array of coordinates with shape=(n_atoms, 3).
Source code in absolv/setup.py
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 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
|