Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Reading DCD trajectory using MPI CHARMM
#38114 11/01/20 04:34 PM
Joined: Nov 2011
Posts: 79
Forum Member
OP Offline
Forum Member
Joined: Nov 2011
Posts: 79
Hi CHARMM users,

Hope all goes well.

I am trying to do some time-consuming analyses on our clusters using a CHARMM (c42b2) compiled with MPI.

When I read a DCD trajectory I got the fatal error:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CHARMM> ! Loop, calculate INTER
CHARMM> ! ---------------------------
CHARMM> set i = 1
Parameter: I <- "1"

CHARMM>

CHARMM> label loop

CHARMM> traj read ! read trajectory

READING TRAJECTORY FROM UNIT 11
NUMBER OF COORDINATE SETS IN FILE: 498
NUMBER OF PREVIOUS DYNAMICS STEPS: 1
FREQUENCY FOR SAVING COORDINATES: 1
NUMBER OF STEPS FOR CREATION RUN: 498

TITLE> Created by DCD plugin^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
TITLE> REMARKS Created 08 July, 2020 at 23:45^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
TITLE> * DATE: 11/ 1/20 9:56:40 CREATED BY USER: zhiyue
TITLE> *

***** LEVEL -5 WARNING FROM *****
***** READ errorno -1 for traj_0_0.dcd: 498 frames expected but 0 frames read
*******************************************************
BOMLEV ( 0) IS REACHED - TERMINATING. WRNLEV IS 5
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The original DCD trajectory was generated by NAMD and processed with VMD PBCTools Plugin. But it was read successfully by a non-MPI CHARMM on the cluster. So I suspect the trajectory itself should be fine.

Thus, my questions are:

1) Can MPI CHARMM read DCD trajectory (with only one CPU requested)?
2) If yes, is there any special requirement (especially on CHARMM) to make it work?

Thanks in advance.

All the best


Zhi (Shane) Yue
Department of Chemistry
University of Chicago
Re: Reading DCD trajectory using MPI CHARMM
shane yue #38115 11/01/20 05:20 PM
Joined: Sep 2003
Posts: 4,800
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,800
Likes: 2
A single-CPU CHARMM job should read and process a dynamics trajectory irrespective of how it was compiled. Most tracjectory processing in CHARMM does not work in parallel.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: Reading DCD trajectory using MPI CHARMM
shane yue #38116 11/01/20 05:26 PM
Joined: Sep 2003
Posts: 8,509
Likes: 1
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,509
Likes: 1
It should work, but there may a number of variables influencing the behavior, such as the compiler suite and version, the MPI implementation and version, other actions being done in the CHARMM input file, and the incomplete implementation of the file format by the NAMD/VMD developers. (They don't properly use all of the data fields in the header record, and that has caused no end of problems in trying to read DCD files produced by other programs into CHARMM, esp. those mangled by the VMD tools.)

If you only wish to use a single core, you could try running the prog w/o using mpirun at startup. You probably need to do the MPI setup, though, due to runtime library dependencies.

Also, it could be a bug, so sometimes using a different CHARMM version can resolve these issues; c45b1 was released in August 2020.


Rick Venable
computational chemist

Re: Reading DCD trajectory using MPI CHARMM
lennart #38117 11/01/20 05:32 PM
Joined: Nov 2011
Posts: 79
Forum Member
OP Offline
Forum Member
Joined: Nov 2011
Posts: 79
Dr. Nilsson,

Thanks for your reply. I appreciate it.

Then I need to double check my Slurm sbatch script to make sure only a single CPU is requested.

Thanks again and stay safe while the pandemic is spiking again worldwide.

All the best


Zhi (Shane) Yue
Department of Chemistry
University of Chicago
Re: Reading DCD trajectory using MPI CHARMM
rmv #38118 11/01/20 08:24 PM
Joined: Nov 2011
Posts: 79
Forum Member
OP Offline
Forum Member
Joined: Nov 2011
Posts: 79
Rick,

Thanks for your further comments and instructions.

I tested the same scripts (CHARMM input & Slurm sbatch) using a trajectory generated by CHARMM and ran into the same fatal error. So I suspect it is more likely that the command 'traj read" does not work for MPI CHARMM.

One workaround is to replace 'traj read' with 'coor DYNA first XX nunit 1 begin @frame stop @frame skip ?SKIP'. And it worked.

I am not sure if CHARMM c45b1 could resolve the issue, but I will try.

Thanks again and stay safe.

All the best

Last edited by shane yue; 11/01/20 08:25 PM.

Zhi (Shane) Yue
Department of Chemistry
University of Chicago
Re: Reading DCD trajectory using MPI CHARMM
shane yue #38119 11/01/20 08:45 PM
Joined: Sep 2003
Posts: 8,509
Likes: 1
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,509
Likes: 1
I recently used TRAJ READ in a loop, with a c43b1 MPI executable using 16 cores so that I could do an ENERGY call, then a series of INTE commands to compute peptide:membrane interactions.


Rick Venable
computational chemist

1 member likes this: shane yue
Re: Reading DCD trajectory using MPI CHARMM
rmv #38120 11/01/20 09:03 PM
Joined: Nov 2011
Posts: 79
Forum Member
OP Offline
Forum Member
Joined: Nov 2011
Posts: 79
Rick,

I am glad to learn that 'TRAJ READ' does work with MPI CHARMM.

Then it should be the compilation problem, based on your first post in reply. Well, seems that things become tricky (for me) now. Is there any special compilation requirement for an MPI CHARMM to work like yours?

Thanks.


Zhi (Shane) Yue
Department of Chemistry
University of Chicago
Re: Reading DCD trajectory using MPI CHARMM
shane yue #38121 11/02/20 10:20 AM
Joined: Sep 2003
Posts: 4,800
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,800
Likes: 2
Note that the coor dyna command computes the average structure over the number of frames processed. It will be very slow if you try to a read a large number of single frames from a long trajectory since it starts over reading the trajectory from the beginning at each invocation. You can use "coor read file ifile .... CONT" (io.info):
READ COOR FILE IFILE 10 UNIT 51
READ COOR FILE CONT IFILE 10 UNIT 51
will first read frame 10 and then frame 20 from unit 51.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: Reading DCD trajectory using MPI CHARMM
lennart #38122 11/02/20 03:09 PM
Joined: Nov 2011
Posts: 79
Forum Member
OP Offline
Forum Member
Joined: Nov 2011
Posts: 79
Dr. Nilsson,

Thanks for your further comments on the command 'COOR DYNA'.

I had been briefed about the "average" feature of 'COOR DYNA' before I started trying this workaround. Since I only deal with a single frame at a time, I think it should be fine. I tested both 'COOR DYNA' and 'TRAJ READ' locally and compared the "INTEraction" outputs, which turned out to be the same. But please kindly correct me if I am wrong.

Also, I am glad to learn the faster way, i.e., "COOR READ file file ... CONT". I appreciate it.

Best


Zhi (Shane) Yue
Department of Chemistry
University of Chicago
Re: Reading DCD trajectory using MPI CHARMM
shane yue #38123 11/02/20 08:32 PM
Joined: Sep 2003
Posts: 4,800
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,800
Likes: 2
Just to be clear : The averaging that COOR DYNA does is not just a feature - it is the explicitly stated purpose of the command, so although it is possible to use it to read single frames, that usage could be confusing to someone looking at the script.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: Reading DCD trajectory using MPI CHARMM
lennart #38124 11/02/20 09:24 PM
Joined: Nov 2011
Posts: 79
Forum Member
OP Offline
Forum Member
Joined: Nov 2011
Posts: 79
Dr. Nilsson,

Thanks for further clarification.

Best


Zhi (Shane) Yue
Department of Chemistry
University of Chicago
Page 1 of 2 1 2

Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.017s Queries: 37 (0.009s) Memory: 0.9999 MB (Peak: 1.1423 MB) Data Comp: Off Server Time: 2020-11-26 14:32:49 UTC
Valid HTML 5 and Valid CSS