htmd.projections.tica module

class htmd.projections.tica.TICA(data, lag, units='frames', dimensions=None)

Bases: object

Class for calculating the TICA projections of a MetricData object

Time-based Independent Component Analysis Projects your data on the slowest coordinates identified for a given lagtime.

Parameters:
  • data (MetricData object) – The object whose data we wish to project onto the top TICA dimensions
  • lag (int) – The correlation lagtime to use for TICA
  • units (str) – The units of lag. Can be ‘frames’ or any time unit given as a string.
  • dimensions (list) – A list of dimensions of the original data on which to apply TICA. All other dimensions will stay unaltered. If None is given, it will apply on all dimensions.

Example

>>> from htmd.projections.tica import TICA
>>> metr = Metric(sims)
>>> metr.set(MetricSelfDistance('protein and name CA'))
>>> data = metr.project()
>>> tica = TICA(data, 20)
>>> datatica = tica.project(3)
Alternatively you can pass a Metric object to TICA. Uses less memory but is slower.
>>> metr = Metric(sims)
>>> metr.set(MetricSelfDistance('protein and name CA'))
>>> slowtica = TICA(metr, 20)
>>> datatica = slowtica.project(3)

References

Perez-Hernandez, G. and Paul, F. and Giorgino, T. and de Fabritiis, G. and Noe, F. (2013) Identification of slow molecular order parameters for Markov model construction. J. Chem. Phys., 139 . 015102.

project(ndim=None)

Projects the data object given to the constructor onto the top ndim TICA dimensions

Parameters:ndim (int) – The number of TICA dimensions we want to project the data on. If None is given it will use choose a number of dimensions to cover 95% of the kinetic variance.
Returns:dataTica – A new MetricData object containing the TICA projected data
Return type:MetricData object

Example

>>> from htmd.projections.tica import TICA
>>> tica = TICA(data,20)
>>> dataTica = tica.project(5)