Menu

SpecialTrajFormat

Nobuyuki MATUBAYASI

To read a trajectory format not supported in VMD plugins

The ermod program uses the VMD plugins to read a trajectory.
When user wants to read a trajectory file of which format is not supported by VMD plugins, he needs to prepare his own program for feeding the trajectory to ermod.
In the ERmod distribution, a few examples of trajectory-reading files are given in the directory of trajectory-formats.

We describe below how to use dcd.f90, one of the files in trajectory-formats, to read a trajectory without using VMD plugins.
Note that the dcd format is supported in VMD plugins and that the following is just an example.

::::sh
mv trajectory.F90 trajectory_orig.F90
cp trajectory-formats/dcd.f90 trajectory.F90
# The part starting here is unnecessary as of ver 0.3.alpha5
# edit Makefile.in so that Makefile.in differs from Makefile.in_orig by
cp Makefile.in Makefile.in_orig
diff Makefile.in_orig Makefile.in
879a880
> ermod-trajectory.$(OBJEXT): trajectory.F90 ermod-utility.$(OBJEXT)
# edit configure so that configure differs from configure_orig by
cp configure configure_orig
diff configure_orig configure
5775c5775
< for flag in "" "-fdefault-real-8" "-autodouble" "-qrealsize=8" "-CcdRR8"; do
> for flag in "" "-fdefault-real-8" "-autodouble" "-qrealsize=8" "-Ad"; do
# The part ending here is unnecessary as of ver 0.3.alpha5
# run the configure script with the option of --disable-vmdplugin
./configure CC=fccpx CFLAGS=-Kfast FC=frtpx FCFLAGS=-Kfast --host=sparc64-unknown-linux-gnu --disable-debug-symbol --disable-vmdplugin --with-fftw=$HOME/opt/fftw --prefix=$HOME/opt/ermod

The option of --disable-vmdplugin is in the above command of configure to disable vmdplugin.
When this option is used, it is not necessary to update vmdplugin.
In fact, the option is not necessary even when vmdplugin is not used, but by disabling it, possible troubles related to vmdplugin can be avoided.

The following explanations are not necessary as of ver 0.3.alpha5.

Makefile.in is modified to resolve the dependency of trajectory.F90 (originally, dcd.f90).

The modification of configure is necessary only when Fujitsu compiler is used.
This modification is done to prevent the shift from real(4) to real(8) within trajectory.F90 (originally, dcd.f90).
A dcd file stores the data in single precision, and thus needs to be treated as such.
In the Fujitsu fortran compiler frtpx, the option of -Ad treats all the real variables at double precision, including those declared explicitly as real(4).
With the option of -CcdRR8, only the variables declared as default real are upgraded.
The corresponding modification is not necessary for the intel compiler.
Even with the -autodouble option, the intel compiler does not upgrade a variable declared as real(4) into real(8).

Actually, the configure file modified as above works fine also when the vmdplugin is used.
In this sense, the option of -CcdRR8 is versatile in compiling ERmod on FX10 with frtpx.


Related

Wiki: Home

MongoDB Logo MongoDB