Topic Options
#23314 - 02/04/10 09:15 AM PBEQ Module: Incorrect Format for write PHI with
rossi Offline
Forum Member

Registered: 03/31/05
Posts: 26
Loc: New York City
Hello:

I am having a problem with the PBEQ module. It writes the incorrect format for the commands

! write phi
open write file unit 40 name @pdb.phi80
write PHI kcal unit 40
close unit 40

only when charmm is compiled with the em64t option. I used the intel compiler. This happens for both c34b2 and for c35b2.

When I used the gnu option the format was fine. The gnu option provides correct format for both x86_64 and x86 Linux operating systems.

What do I mean by incorrect format? The resulting @pdb.phi80 file is unreadable by VMD, and the file is about twice as large for the em64t case.

I wish I could quantify this problem better, and there is probably an easy answer to this ( It is not IOFOrmat NOEXtended placed in the PBEQ module.). I used the simple example given in a MMTSB tutorial. The phi80 file is easily read by VMD for a gnu-compiled version of charmm but not for a em64t-compiled version. Try it, and you will see.

Thanks for your help with this.

Regards,

Angelo

Top
#23315 - 02/04/10 09:46 AM Re: PBEQ Module: Incorrect Format for write PHI with [Re: rossi]
lennart Online   content
Forum Member

Registered: 09/25/03
Posts: 3012
Loc: ~ 59N, 15E
When you say "gnu option" I assume that you did not specify x86_64.

On a 64-bit system (em64t) integer variables are 64-bit by default, and some of the information written by WRITE PHI is stored in integer variables. The correct solution is probably to make these 32-bit integers before the unformatted write operation in routine SAVGD1 in source/manip/pbeq*.src.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#23316 - 02/04/10 10:00 AM Re: PBEQ Module: Incorrect Format for write PHI with [Re: lennart]
rossi Offline
Forum Member

Registered: 03/31/05
Posts: 26
Loc: New York City
Originally Posted By: lennart
When you say "gnu option" I assume that you did not specify x86_64.


Hello:

YES. This is correct. For the gnu option, I did not specify x84_64.

Regards,

Angelo

Top
#23317 - 02/04/10 10:12 AM Re: PBEQ Module: Incorrect Format for write PHI with [Re: rossi]
lennart Online   content
Forum Member

Registered: 09/25/03
Posts: 3012
Loc: ~ 59N, 15E
In pbeq2.src, routine SAVGD1, try changing this

INTEGER I
IF(UNIT.GT.0)THEN
IF(PRNLEV.GE.2) WRITE(OUTU,'(3x,A)')
$ 'FIRST RECORD IS: NCLX,NCLY,NCLZ,DCEL,XBCEN,YBCEN,ZBCEN'
IF(PRNLEV.GE.2) WRITE(OUTU,'(3x,A)')
$ ' EPSW,EPSP,CONC,TMEMB,ZMEMB,EPSM'
WRITE(UNIT) NCLX,NCLY,NCLZ,DCEL,XBCEN,YBCEN,ZBCEN

to

INTEGER I
INTEGER*4 NCLX4,NCLY4,NCLZ4
IF(UNIT.GT.0)THEN
NCLX4=NCLX
NCLY4=NCLY
NCLZ4=NCLZ
IF(PRNLEV.GE.2) WRITE(OUTU,'(3x,A)')
$ 'FIRST RECORD IS: NCLX,NCLY,NCLZ,DCEL,XBCEN,YBCEN,ZBCEN'
IF(PRNLEV.GE.2) WRITE(OUTU,'(3x,A)')
$ ' EPSW,EPSP,CONC,TMEMB,ZMEMB,EPSM'
WRITE(UNIT) NCLX4,NCLY4,NCLZ4,DCEL,XBCEN,YBCEN,ZBCEN
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#23318 - 02/04/10 11:25 AM Re: PBEQ Module: Incorrect Format for write PHI with [Re: lennart]
rossi Offline
Forum Member

Registered: 03/31/05
Posts: 26
Loc: New York City
Dear Professor Nilsson:

Hooray!!!! That did it! I should have thought of this myself.

Thank you so much.

As a postscript:

When I compiled charmm orginally, I used the keepf and keepo options leaving pbeq2.f in the build/em64t directory:

1. made your suggested changes to pbeq2.f and re-compiled.

2. copied the new pbeq2.o file to the lib/em64t directory.

3. executed the command: ar -vr misc.a pbeq2.o to replace the old pbeq2.o object file with the new one.

4. executed a "make" command in the build/em64t directory

5. copied the resulting charmm.exe executable to exec/em64t/charmm

Thanks again. This is great.

Warm regards,

Angelo

Top
#23319 - 02/04/10 11:33 AM Re: PBEQ Module: Incorrect Format for write PHI with [Re: rossi]
lennart Online   content
Forum Member

Registered: 09/25/03
Posts: 3012
Loc: ~ 59N, 15E
Very good!
The simple standard way is to do the edits to pbeq2.src and then just issue the "install.com em64t" command again.
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top


Moderator:  chmgr, rmv