info
FragmentInfo
FragmentInfo(source: str = utils.path.biological_interfaces, fragment_length: int = 5, sql: bool = False, **kwargs)
Stores all Fragment metadata for a particular FragmentDatabase
Parameters:
-
source
(str
, default:biological_interfaces
) –Which type of information to use
-
fragment_length
(int
, default:5
) –What is the length of the fragment database
-
sql
(bool
, default:False
) –Whether the database is stored in SQL table
-
**kwargs
–
Source code in symdesign/structure/fragment/info.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
location
property
location: AnyStr | None
Provide the location where fragments are stored
aa_frequencies
property
aa_frequencies: dict[protein_letters_alph1, float]
Retrieve database specific amino acid representation frequencies
Returns:
-
dict[protein_letters_alph1, float]
–{'A': 0.11, 'C': 0.03, 'D': 0.53, ...}
retrieve_cluster_info
retrieve_cluster_info(cluster: str = None, source: source_literal = None, index: str = None) -> dict[str, int | float | str | dict[int, dict[protein_letters_literal | str, float | tuple[int, float]]]]
Return information from the fragment information database by cluster_id, information source, and source index
Parameters:
-
cluster
(str
, default:None
) –A cluster_id to get information about
-
source
(source_literal
, default:None
) –The source of information to retrieve. Must be one of 'size', 'rmsd', 'rep', 'mapped', or 'paired'
-
index
(str
, default:None
) –The index to gather information from. Source must be one of 'mapped' or 'paired' to use
Returns: {'size': ..., 'rmsd': ..., 'rep': ..., 'mapped': indexed_frequencies, 'paired': indexed_frequencies} Where indexed_frequencies has format {-2: {'A': 0.1, 'C': 0., ..., 'info': (12, 0.41)}, -1: {}, ..., 2: {}}
Source code in symdesign/structure/fragment/info.py
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 |
|
load_cluster_info
load_cluster_info(ids: Sequence[str] = None)
Load cluster information from the fragment database source into attribute .info
Parameters:
-
ids
(Sequence[str]
, default:None
) –['1_2_123', ...]
Sets
self.info (dict[str, dict]): {'1_2_123': {'size': , 'rmsd': , 'rep': , 'mapped': , 'paired': }, ...}
Source code in symdesign/structure/fragment/info.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
load_cluster_info_from_text
load_cluster_info_from_text(ids: Sequence[str] = None)
Load cluster information from the fragment database source text files into attribute .info
Parameters:
-
ids
(Sequence[str]
, default:None
) –['1_2_123', ...]
Sets
self.info (dict[str, dict]): {'1_2_123': {'size': , 'rmsd': , 'rep': , 'mapped': , 'paired': }, ...}
Source code in symdesign/structure/fragment/info.py
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 |
|
get_cluster_id
staticmethod
get_cluster_id(cluster_id: str, index: int = 3) -> str
Returns the cluster identification string according the specified index
Parameters:
-
cluster_id
(str
) –The id of the fragment cluster. Ex: "1_2_123"
-
index
(int
, default:3
) –The index on which to return. Ex: index_number=2 gives 1_2
Returns: The cluster_id modified by the requested index_number
Source code in symdesign/structure/fragment/info.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
|
parameterize_frag_length
parameterize_frag_length(length: int) -> tuple[int, int]
Generate fragment length range parameters for use in fragment functions
Parameters:
-
length
(int
) –The length of the fragment
Returns: The tuple that provide the range for the specified length centered around 0 ex: length=5 -> (-2, 3), length=6 -> (-3, 3)
Source code in symdesign/structure/fragment/info.py
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
|