Giter Club home page Giter Club logo

clusterlp-mpi's Introduction

clusterLP-MPI

Overview

Cluster a protein-ligand system with RMSD using separate sets of atoms for the alignment and distance computation. Both the "alignment" and "distance" atoms for each frame will be loaded, and in each frame, the cartesian center of the alignment atoms is computed and subtracted out of the coordinates of both the alignment and distance atoms.

Distances are calculated between two frames by computing the rotation matrix which optimally overlays the alignment atoms with one and other, and then applying that rotation matrix to the distance atoms in the first frame and computing their root-mean-squared deviation w.r.t the other frame.

Clustering is performed with the k-centers algorithm. You may specify the termination criterion either by the number of states, or a cutoff distance (which ensures that all data points are within that distance of their assigned cluster center).

This script uses hybrid MPI/OpenMP paralleism in addition to highly optimized SIMD vectorization within the compute kernels. Using multiple MPI processes requires running this command using your MPI implementation's process manager, e.g. mpirun, mpiexec, or aprun. The number of OpenMP threads can be controled by setting the OMP_NUM_THREADS environment variable. For example,

$ export OMP_NUM_THREADS=4
$ mpirun -np 16 clusterLP-MPI <options>

Dependencies

This script requires python, the latest development version of MDTraj available on github, numpy, and mpi4py.

Installation

No installation is required. Just call the script or move it into your PATH if you like.

clusterlp-mpi's People

Contributors

rmcgibbo avatar

Watchers

 avatar  avatar  avatar

Forkers

cxhernandez

clusterlp-mpi's Issues

IndexError: list index out of range

trajid seems to be out of range of the trajectory_files array. This error only happens in certain cases, however, so it might just be some sort of weird exception to the logic in line 256.

256    trajid = np.max(np.where(centers[i][1] >= cumulative_lengths)[0])
257    frame = centers[i][1] - cumulative_lengths[trajid]
258    trj = trajectory_files[trajid]

CSV Output is jumbled up

I'm wondering if the threads are trying to write all at once...? Maybe for the time being, an option is to have each thread write to its own clusters_RANK.csv file, and I can just cat them afterwards.

/home/cxh/sir_msm/dcd/42.dcd, 201////home/cxh/sir_msm/dcd/146.dcd, /ho/ho/home/cxh/sir_msm/dcd/146.dcd/h///home/cxh/sir_msm/dcd/42.dcd,//////home/cxh/sir_msm/dcd/13.dcd/ho/ho//home/cxh/sir_msm/dcd/13.dc//h//h//home/cxh/sir_msm/dcd/13.dc/h/h//h/h/home/cxh/sir_msm/dcd/68/ho/ho/h/ho/home/cxh/sir_msm/dcd/13/ho/h/hom///home/cxh/sir_msm/dcd//home//ho/hom/home/cxh/sir_msm/dcd/home/h/ho/hom/home/cxh/sir_msm/dcd/68/hom/hom/hom/home/cxh/sir_msm/dcd/6/home/cx/h/h/home/cxh/sir_msm/dcd/6/home/c//h//home/cxh/sir_msm/dcd/6/home/c//ho//home/cxh/sir_msm/dcd//home/cx/h/ho/home/cxh/sir_msm/dcd//home/c//h/h/home/cxh/sir_msm/dcd//ho/hom/hom///home/cxh/sir_msm/dcd/1//home/hom/h//home/cxh/sir_msm/dcd//home//hom/hom/home/cxh/sir_msm/dcd/home//ho//home/cxh/sir_msm/dcd/68./home////home/cxh/sir_msm/dcd/13.d/home/c//home/cxh/sir_msm/dcd/13.dcd, 1135
/home/cxh/sir_msm/dcd/13.dcd, 2025
/home/cxh/sir_msm/dcd/68.dcd, 1855
/home/cxh/sir_msm/dcd/68.dcd, 3258
/home/cxh/sir_msm/dcd/68.dcd, 1550//home/cxh/sir_msm/dcd/13.dcd, 107/ho/home/cxh/sir_msm/dcd/13.dcd, 40//home/cxh/sir_msm/dcd/68.dcd, 760/h/home/cxh/sir_msm/dcd/13.dcd, 117/ho/home/cxh/sir_msm/dcd/68.dcd, 472/h/home/cxh/sir_msm/dcd/68.dcd, 16/hom/home/cxh/sir_msm/dcd/13.dcd, /home/home/cxh/sir_msm/dcd/22.dcd, /home/home/cxh/sir_msm/dcd/22.dcd, /home/home/cxh/sir_msm/dcd/22.dcd, /home/home/cxh/sir_msm/dcd/22.dcd,/hom/home/cxh/sir_msm/dcd/22.dcd, 1/home/home/cxh/sir_msm/dcd/22.dcd, /home/home/cxh/sir_msm/dcd/22.dcd, /home/home/cxh/sir_msm/dcd/22.dcd,/home/home/cxh/sir_msm/dcd/22.dcd,/home/home/cxh/sir_msm/dcd/22.dcd, 1667
/home/cxh/sir_msm/dcd/22.dcd, 15115//home/cxh/sir_msm/dcd/22.dcd, 6916//home/cxh/sir_msm/dcd/22.dcd, 1125//home/cxh/sir_msm/dcd/22.dcd, 113
/home/cxh/sir_msm/dcd/22.dcd, 6125
/home/cxh/sir_msm/dcd/22.dcd, 7803
/home/cxh/sir_msm/dcd/22.dcd, 14968
/home/cxh/sir_msm/dcd/22.dcd, 2778
/home/cxh/sir_msm/dcd/22.dcd, 252
/home/cxh/sir_msm/dcd/22.dcd, 5638
/home/cxh/sir_msm/dcd/22.dcd, 1152
/home/cxh/sir_msm/dcd/22.dcd, 4234
/home/cxh/sir_msm/dcd/22.dcd, 532
/home/cxh/sir_msm/dcd/22.dcd, 877
/home/cxh/sir_msm/dcd/22.dcd, 10249

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.