mdciao.contacts.per_traj_ctc

mdciao.contacts.per_traj_ctc(top, itraj, ctc_residxs_pairs, chunksize, stride, traj_idx, **mdcontacts_kwargs)

Wrapper for mdtraj.contacts for strided, chunked computation of contacts

Input can be directly mdtraj.Trajectory objects or trajectory files on disk (e.g. xtcs, dcs etc)

You can fine-tune the computation itself using mdcontacts_kwargs

Prints out progress report while working

Parameters
  • top (~mdtraj.Topology) –

  • itraj (~mdtraj.Trajectory or filename) –

  • ctc_residxs_pairs (iterable of pairs of residue indices) – Distances to be computed

  • chunksize (int) – Size (in frames) of the “chunks” in which the contacts will be computed. Decrease the chunksize if you run into memory errors

  • stride (int) – Stride with which the contacts will be streamed over

  • traj_idx (int) – The index of the trajectory being computed. For completeness of the progress report

  • mdcontacts_kwargs

    Optional keyword arguments to pass to mdtraj.contacts

    If “scheme” is contained in mdcontacts_kwargs and scheme==COM, the center of mass will be computed

Returns

  • ictcs, itime, iatps

  • ictcs (2D np.ndarray (Nframes, Nctcs), where Nctcs= len(ctc_residxs_pairs)) – time traces of the wanted contacts, in

  • itime (1D np.ndarray of len Nframes) – timestamps of the computed contacts

  • iatps (2D np.ndarray (Nframes, 2*Nctcs)) – atom-indices yielding distances in ictcs, helps dis-aggregate the residue interaction into backbone-backbone, backbone-sidechain, or sidechain-sidechain