schrodinger.trajectory.rmsd2d module

A module to calculte 2D RMSD for Desmond trajectories using threading/multiprocessing.

To calculate 2D RMSD for Desmond Trajectory call:

from schrodinger.trajectory.rmsd2d import calc_rmsd_matrix from schrodinger.trajectory.desmondsimulation import create_simulation dsim = create_simulation(“foo-out.cms”, “foo_trj”) rmsd_matrix = calc_rmsd_matrix(dsim,

‘BACKBONE’, ‘BACKBONE’, frame_list=None, nworkers=8, nframes=50, multiprocessing = True)

Copyright (C), Schrodinger, LLC. All rights reserved.

class schrodinger.trajectory.rmsd2d.FrameLoader(threadID, dsim, row_indices, col_indices)

Bases: threading.Thread

A multi-threading class to load trajectory frame.

load(frames, indices)
run()
class schrodinger.trajectory.rmsd2d.ModelBase(module, worker_creator)
createWorker(worker_id, rmsd_matrix, size, row_frames, col_frames, row_id, col_id, row_size, col_size, row_block_begin, col_block_begin, rmsd_indices, fit_indices)
lock()
class schrodinger.trajectory.rmsd2d.MultiprocessingModel

Bases: schrodinger.trajectory.rmsd2d.ModelBase

createSharedArray(ctype, size)
class schrodinger.trajectory.rmsd2d.RMSDCalculator(worker_id, rmsd_matrix, size, row_frames, col_frames, row_id, col_id, row_size, col_size, row_block_begin, col_block_begin, rmsd_indices, fit_indices)

A multi-threading class to calculat pairwise RMSD on a set of trajectory frames.

run()
class schrodinger.trajectory.rmsd2d.RMSDMultiprocessing(worker_id, rmsd_matrix, size, row_frames, col_frames, row_id, col_id, row_size, col_size, row_block_begin, col_block_begin, rmsd_indices, fit_indices)

Bases: schrodinger.trajectory.rmsd2d.RMSDCalculator, multiprocessing.process.Process

class schrodinger.trajectory.rmsd2d.RMSDThreading(worker_id, rmsd_matrix, size, row_frames, col_frames, row_id, col_id, row_size, col_size, row_block_begin, col_block_begin, rmsd_indices, fit_indices)

Bases: schrodinger.trajectory.rmsd2d.RMSDCalculator, threading.Thread

class schrodinger.trajectory.rmsd2d.ThreadingModel

Bases: schrodinger.trajectory.rmsd2d.ModelBase

createSharedArray(ctype, size)
schrodinger.trajectory.rmsd2d.calc_rmsd(r1, r2, f1=None, f2=None)
schrodinger.trajectory.rmsd2d.calc_rmsd_matrix(dsim, rmsd_asl_expr, fit_asl_expr=None, frame_list=None, nworkers=1, nframes=1, multiprocessing=True)

A multithreading/multiprocessing function to calculate 2D RMSD matrix

type dsim:DesmondSimulation instance
param dsim:DesmondSimulation instance that contains reference to trajectory.
type rmsd_asl_expr:
 string
:param rmsd_asl_expr
The atom selection from which to indetify atom indices to be compared.
type fit_asl_expr:
 string
param fit_asl_expr:
 The atom selection from which to indetify atom indices to be transformed. if fit_asl_expr is set to None, it will not transform the coordinates.
type nworkers:integer
param nworkers:Number of threads/processes used to load frames and calculate rmsd matrix.
type nframes:integer
param nframes:Number of frames handled by each worker in one run.
type multiprocessing:
 boolean
param multiprocessing:
 

:return 2D RMSD numpy array

schrodinger.trajectory.rmsd2d.calc_rmsd_matrix_block(model, rmsd_matrix, size, row_frames, col_frames, rmsd_indices, fit_indices, i, j, block_size, nworkers)
schrodinger.trajectory.rmsd2d.load_frame(dsim, row_block_id, col_block_id, block_size, nframes, nthreads, frame_list)