helpers
A list of functions with a clear purpose that does not belong specifically to any of the existing units.
Classes:
Functions:
-
get_new_atom_names
–todo - add unit tests
-
get_atom_names_counter
–name_counter: a dictionary with atom as the key such as 'N', 'C', etc,
-
parse_frcmod_sections
–Copied from the previous TIES. It's simpler and this approach must be fine then.
ArgparseChecker
Methods:
-
str2bool
–ArgumentParser tool to figure out the bool value
-
logging_lvl
–ArgumentParser tool to figure out the bool value
str2bool
staticmethod
str2bool(v)
ArgumentParser tool to figure out the bool value
Source code in ties/helpers.py
116 117 118 119 120 121 122 123 124 125 126 |
|
logging_lvl
staticmethod
logging_lvl(v)
ArgumentParser tool to figure out the bool value
Source code in ties/helpers.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
get_new_atom_names
get_new_atom_names(atoms, name_counter=None)
todo - add unit tests
@parameter/returns name_counter: a dictionary with atom as the key such as 'N', 'C', etc, the counter keeps track of the last used counter for each name. Empty means that the counting will start from 1. input atoms: mdanalysis atoms
Source code in ties/helpers.py
15 16 17 18 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 |
|
get_atom_names_counter
get_atom_names_counter(atoms)
name_counter: a dictionary with atom as the key such as 'N', 'C', etc, the counter keeps track of the last used counter for each name. Ie if there are C1, C2, C3, this will return {'C':3} as the last counter.
Source code in ties/helpers.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|
parse_frcmod_sections
parse_frcmod_sections(filename)
Copied from the previous TIES. It's simpler and this approach must be fine then.
Source code in ties/helpers.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|