pair
Classes:
-
Pair
–Facilitates the creation of morphs.
Pair
Pair(ligA, ligZ, config=None, **kwargs)
Facilitates the creation of morphs. It offers functionality related to a pair of ligands (a transformation).
:param ligA: The ligand to be used as the starting state for the transformation.
:type ligA: :class:Ligand
or string
:param ligZ: The ligand to be used as the ending point of the transformation.
:type ligZ: :class:Ligand
or string
:param config: The configuration object holding all settings.
:type config: :class:Config
fixme - list all relevant kwargs here
param ligand_net_charge: integer, net charge of each ligand (has to be the same)
Methods:
-
superimpose
–Please see :class:
Config
class for the documentation of kwargs. The passed kwargs overwrite the config -
set_suptop
–Attach a SuperimposedTopology object along with the ParmEd objects for the ligA and ligZ.
-
make_atom_names_unique
–Ensure that each that atoms across the two ligands have unique names.
-
check_json_file
–Performance optimisation in case TIES is rerun again. Return the first matched atoms which
-
merge_frcmod_files
–Merges the .frcmod files generated for each ligand separately, simply by adding them together.
-
overlap_fractions
–Calculate the size of the common area.
Source code in ties/pair.py
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 |
|
superimpose
superimpose(**kwargs)
Please see :class:Config
class for the documentation of kwargs. The passed kwargs overwrite the config
object passed in the constructor.
fixme - list all relevant kwargs here
:param use_element_in_superimposition: bool whether the superimposition should rely on the element initially, before refining the results with a more specific check of the atom type. :param manually_matched_atom_pairs: :param manually_mismatched_pairs: :param redistribute_q_over_unmatched:
Source code in ties/pair.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 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 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
|
set_suptop
set_suptop(suptop, parmed_ligA, parmed_ligZ)
Attach a SuperimposedTopology object along with the ParmEd objects for the ligA and ligZ.
:param suptop: :class:SuperimposedTopology
:param parmed_ligA: An ParmEd for the ligA
:param parmed_ligZ: An ParmEd for the ligZ
Source code in ties/pair.py
196 197 198 199 200 201 202 203 204 205 206 |
|
make_atom_names_unique
make_atom_names_unique(out_ligA_filename=None, out_ligZ_filename=None, save=True)
Ensure that each that atoms across the two ligands have unique names.
While renaming atoms, start with the element (C, N, ..) followed by the count so far (e.g. C1, C2, N1).
Resnames are set to "INI" and "FIN", this is useful for the hybrid dual topology.
:param out_ligA_filename: The new filenames for the ligands with renamed atoms. If None, the default naming convention is used. :type out_ligA_filename: string or bool :param out_ligZ_filename: The new filenames for the ligands with renamed atoms. If None, the default naming convention is used. :type out_ligZ_filename: string or bool :param save: Whether to save to the disk the ligands after renaming the atoms :type save: bool
Source code in ties/pair.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
|
check_json_file
check_json_file()
Performance optimisation in case TIES is rerun again. Return the first matched atoms which can be used as a seed for the superimposition.
:return: If the superimposition was computed before, and the .json file is available, gets one of the matched atoms. :rtype: [(ligA_atom, ligZ_atom)]
Source code in ties/pair.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
|
merge_frcmod_files
merge_frcmod_files(ligcom=None)
Merges the .frcmod files generated for each ligand separately, simply by adding them together.
The duplication has no effect on the final generated topology parm7 top file.
We are also testing the .frcmod here with the user's force field in order to check if the merge works correctly.
:param ligcom: Either "lig" if only ligands are present, or "com" if the complex is present. Helps with the directory structure. :type ligcom: string "lig" or "com"
Source code in ties/pair.py
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 |
|
overlap_fractions
overlap_fractions()
Calculate the size of the common area.
:return: Four decimals capturing: 1) the fraction of the common size with respect to the ligA topology, 2) the fraction of the common size with respect to the ligZ topology, 3) the percentage of the disappearing atoms in the disappearing molecule 4) the percentage of the appearing atoms in the appearing molecule :rtype: [float, float, float, float]
Source code in ties/pair.py
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 |
|