parsing
Functions:
-
pmd_structure_from_rdmol
–Generate a parmed structure from an RDKit Mol.
-
get_atoms_bonds_and_parmed_structure
–:param filename:
-
correct_mol2_gaff_atoms
–The mol2 gaff atom types are not understood by Parmed.
-
get_atoms_bonds_from_pmd_structure
–convert the Parmed atoms into Atom objects.
-
do_atom_names_have_simple_format
–Check if the atom name is followed by a number, e.g. "C15"
pmd_structure_from_rdmol
pmd_structure_from_rdmol(rd_mol: Mol)
Generate a parmed structure from an RDKit Mol.
The atom types and charges are extracted from the properties.
:param rd_mol: :return:
Source code in ties/parsing.py
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 |
|
get_atoms_bonds_and_parmed_structure
get_atoms_bonds_and_parmed_structure(filename)
:param filename: :return: (atoms, bonds, parmed_structure)
Source code in ties/parsing.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
correct_mol2_gaff_atoms
correct_mol2_gaff_atoms(parmed_structure: Structure)
The mol2 gaff atom types are not understood by Parmed.
e.g. "cl" are not read as chlorine, but as carbon
This functions corrects them by modifying the input structure.
Source code in ties/parsing.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
|
get_atoms_bonds_from_pmd_structure
get_atoms_bonds_from_pmd_structure(parmed_structure: Structure)
convert the Parmed atoms into Atom objects.
Source code in ties/parsing.py
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 199 200 201 202 |
|
do_atom_names_have_simple_format
do_atom_names_have_simple_format(names)
Check if the atom name is followed by a number, e.g. "C15" Note that the full atom name cannot be more than 4 characters. This is because the PDB format does not allow for more characters which can lead to inconsistencies.
:param names: a list of atom names :type names: list[str] :return True if they all follow the correct format.
Source code in ties/parsing.py
205 206 207 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 |
|