MOSAICS on Biowulf

Mosaics is a collection of tools for characterizing membrane structure and dynamics within simulated trajectories of molecular systems.

References:

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program.
Sample session (user input in bold):

[user@biowulf]$ sinteractive
[user@cn4338 ~]$ module load mosaics
[+] Loading gcc  8.5.0  ...
[+] Loading openmpi/4.1.4/gcc-8.5.0  ...
[+] Loading cmake 3.23.0  ...
[+] Loading mosaics  1.0.0  on cn4274

Example
Most jobs should be run as batch jobs.

Execute mosaics

[user@cn4338 ~]$ mpirun -n 1 mosat_mpi -h

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                              //
//                                                            MosAT                                                             //
//                                                                                                                              //
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Input: mosat_mpi -h

Description: MOSAICS Analysis Template (MosAT) is a versatile C++ program used for reading trajectory data. The program is
designed to make easy the task of writing an analysis program without the sacrifice of performance. Specifically, MosAT will read
a trajectory without any additional programming required by the user. MosAT also reads a reference file such as a .gro or .pdb
file. Using the reference file, MosAT generates the atom and residue names and numbers for all molecules in the system.
Additional data such as atomic masses, the initial coordinates and initial box are also extracted. This makes possible the
creation of data structures before the main loop is executed at which point the trajectory is read. Furthermore, to reduce memory
constraints, only a single frame is ever read into memory at a given time. MosAT makes easy the addition of command line

arguments. This is done using the add_argument function. Likewise, user defined atom selections are possible through use of
selection cards. To ensure speed, MosAT is pre-parallelized (using MPI) to take advantage of modern supercomputers. In general,
the block parallelization scheme used by MosAT splits the trajectory into chunks where each core is assigned a section to read.
In most cases, this removes any communication requirements until after the trajectory has been read. For this reason, the
scalability with block parallelization is nearly linear. Alternatively, the parallelization scheme can be set (by turning off
block parallelization) so each rank reads the entire trajectory. To ensure reliability and speed of an analysis program, MosAT
makes full use of the trajectory file readers developed by the Gromacs team and simplified for use with analysis tools by the
MDTraj developers. Additional functionality implemented in MosAT include least squares fitting, a stride for skipping frames, and
control over the begin and end frames read. Compatible trajectory types include xtc, trr, gro and pdb with cross IO functionality
supported.

        To use this program please enter the following command line options.

        -traj   R    S    Input trajectory file (xtc, trr, pdb, gro)
        -ref    R    S    Refference file (pdb, gro)
        -o      O    S    Output trajectory file (xtc, trr, pdb, gro)
        -stride O    I    Read every 'stride' frame
        -b      O    I    Skip frames before this number
        -e      O    I    Skip frames after this number
        -lsq    O    S    Index for lsq fitting (ndx)
        -lsq_d  O    I    Dimension for lsq fitting (3:x,y,z 2:x,y)
        -lsq_r  O    I    Reference structure for lsq fitting (0:ref 1:first_frame)
        -h      O    -    print help options


Preparing trajectory file

[user@cn4338] cp -a /usr/local/apps/mosaics/1.0.0/examples/membrane_thickness .
[user@cn4338] cd membrane_thickness/
[user@cn4338 membrane_thickness]$ mpirun -n 1 mosat_mpi -traj traj.xtc -ref ref.pdb -o ref_renumbered.gro 

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                              //
//                                                            MosAT                                                             //
//                                                                                                                              //
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Input: mosat_mpi -traj traj.xtc -ref ref.pdb -o ref_renumbered.gro

Could not find an info file for traj.xtc. Will analyze the trajectory.

Analyzing traj.xtc.
Finished analyzing traj.xtc.
Trajectory frames: 1001

Writing info file traj.xtc.info

Analyzing reference file (ref.pdb).
Finished analyzing ref.pdb.

Distributing the work load across 1 mpi processes.
  Rank       Frames  First_frame   Last_frame
---------------------------------------------
     0         1001            0         1000

Reading the file traj.xtc and preparing for analysis.
-----------------------------------------------------------------------------------------------------------------------------------
Finished frame     452 with  45.2 percent done overall in  0 hr  0 min 10 sec. Estimated time to completion is  0 hr  0 min 12 sec.
Finished frame     905 with  90.4 percent done overall in  0 hr  0 min 20 sec. Estimated time to completion is  0 hr  0 min  2 sec.

Finalizing trajectory.
Working on ref_renumbered_0.gro

Performance stats:
             Routine      Hours    Minutes    Seconds    Percent
-----------------------------------------------------------------
  Analyze Trajectory          0          0          3       11.5
           Main Loop          0          0         22       84.6
 Finalize Trajectory          0          0          1        3.8
               Total          0          0         26      100.0

Analysis completed successfully.