|
|
str | fullhelp |
| |
|
| lo = options.LoosOptions("Compute distance matrix using contacts", fullhelp) |
| |
|
| default |
| |
|
| type |
| |
|
| help |
| |
|
| action |
| |
|
| args = lo.parse_args() |
| |
|
| system = loos.createSystem(args.model) |
| |
|
| chain = loos.selectAtoms(system, args.selection) |
| |
|
| residues = chain.splitByResidue() |
| |
|
| num_residues = len(residues) |
| |
| | t |
| |
|
| traj = loos.pyloos.VirtualTrajectory(t) |
| |
|
int | num_pairs = len(residues) * (len(residues)-1) // 2 |
| |
|
| contacts = numpy.zeros((len(traj), num_pairs), float) |
| |
|
| default_box = loos.GCoord(10000., 10000., 10000.) |
| |
|
int | frame_number = 0 |
| |
|
| box = frame.periodicBox() |
| |
|
int | index = 0 |
| |
|
| r1 = residues[i] |
| |
| | contact |
| |
|
| dists = pdist(contacts, 'euclidean') |
| |
|
| square_dists = squareform(dists) |
| |
|
| outfile = open(args.outfile, "w") |
| |
|
| frame_boundaries = traj.frameBoundaries() |
| |
|
list | traj_header = [" traj start end filename"] |
| |
|
list | s = ["0", "0", str(len(traj)-1), args.traj] |
| |
|
int | i = len(args.traj) - 1 |
| |
|
str | header = "\n".join(str(x) for x in [lo.header(), traj_header]) |
| |
From a trajectory, create an all-to-all distance matrix analogous to rmsds, but
working in the space of residue-residue contacts