cylindra.cylmeasure
CylinderSurface
Class to define the surface of a spline cylinder.
Source code in cylindra/cylmeasure.py
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 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
transform_vector(vec, start)
Transform vector(s) to (r, y, a).
Source code in cylindra/cylmeasure.py
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 270 271 272 273 274 | |
LatticeParameters
Source code in cylindra/cylmeasure.py
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | |
calculate(mole, spl=None)
calculate(mole: Molecules, spl: CylSpline) -> pl.Series
calculate(layer: MoleculesLayer) -> pl.Series
Calculate this lattice parameter for the given molecule.
Source code in cylindra/cylmeasure.py
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | |
RegionProfiler
Source code in cylindra/cylmeasure.py
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 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | |
calculate(props, *more_props)
Calculate properties for each region.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
props
|
str or list of str
|
Property names. Must be chosen from following: - area: total number of molecules. - length: longitudinal length of the region. - width: lateral width of the region. - sum: sum of target values. - mean: mean of target values. - median: median of target values. - max: max of target values. - min: min of target values. - std: standard deviation of target values. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with columns corresponding to the given property names. |
Source code in cylindra/cylmeasure.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 | |
from_components(mole, spl, target='nth', label='pf-id')
classmethod
Construct a region profiler from molecules and splines.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mole
|
Molecules
|
Molecules to be profiled. Must have features "nth", "pf-id". |
required |
spl
|
CylSpline
|
Spline from which the molecules are generated. |
required |
target
|
str
|
Column name of the target values. This is not needed if properties that do not require target values are to be calculated. |
'nth'
|
label
|
str
|
Column name of the label values. Must be an integer column. |
'pf-id'
|
Source code in cylindra/cylmeasure.py
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 347 348 349 350 351 352 353 354 355 356 357 | |
n_regions()
Number of regions.
Source code in cylindra/cylmeasure.py
394 395 396 397 | |
calc_curve_index(mole, spl)
The curve orientation index.
The curve orientation is defined as the cosine of the angle between the second derivative and the relative molecule vector. That is, the inside of the curve is positive.
Source code in cylindra/cylmeasure.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
calc_elevation_angle(mole, spl)
Calculate the elevation angle of the longitudinal neighbors.
Source code in cylindra/cylmeasure.py
37 38 39 40 41 42 43 44 45 46 47 48 | |
calc_inter_pf_angle(mole, spl)
Calculate the inter-protofilament angle.
Source code in cylindra/cylmeasure.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 | |
calc_radius(mole, spl)
Calculate the radius of each molecule.
Source code in cylindra/cylmeasure.py
81 82 83 84 85 86 87 88 89 | |
calc_rise(mole, spl)
Add a column of rise angles of each molecule.
Source code in cylindra/cylmeasure.py
92 93 94 95 96 97 98 99 100 101 | |
calc_skew(mole, spl)
Calculate the skew of each molecule to the next one.
Source code in cylindra/cylmeasure.py
51 52 53 54 55 56 57 58 59 60 61 62 | |
calc_spacing(mole, spl)
Calculate the interval of each molecule to the next one.
Source code in cylindra/cylmeasure.py
23 24 25 26 27 28 29 30 31 32 33 34 | |
calc_twist(mole, spl)
Calculate the twist of each molecule to the next one.
Source code in cylindra/cylmeasure.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |