[CPMD-list] Possible Bug?

Axel Kohlmeyer akohlmey at cmm.chem.upenn.edu
Wed Nov 21 19:24:03 CET 2007


On Wed, 21 Nov 2007, Ali Hassanali wrote:

AH> Dear cpmd users,

dear ali and chris!

AH> I am currently using CPMD_v3.11.1.  For a VIBRATIONAL ANALYSIS
AH> calculation, when calculating FINITE DIFFERENCES for only those atoms
AH> within a specified sphere, I have found that when the ANGSTROM keyword

please note (and that applies to _EVERYBODY_ using the ANGSTROM
keyword), that due to the very way, ANGSTROM is implemented
there are a lot of risks associated with it and everything 
except simple MD or geometry optimization is going to have
(random) problems due to parameters not converted properly.
short of rewriting the input parser completely (and thus
losing backwards compatibility), there is no way around it.

so i _STRONGLY_ advise to use atomic units for everything
and not use ANGSTROM unless you know what you are doing
and/or stick to simple MD. there are still plenty of places
in the lesser used features, where the appropriate conversion
of parameters is not done or even impossible.

AH> is specified in the SYSTEM section, the variables COORD_FDIFF and
AH> R_FDIFF are only converted to Bohr on the PARENT processor.  The effect
AH> was for my parallel jobs to hang.  Adding a few lines of code after line
AH> 1021 in setsys.f appears to have solved the problem, for my input files
AH> at least.
AH> 
AH> 
AH>       IF(.NOT.PARENT) THEN ! < -- line 1056 in setsys.f
AH>         CALL MEMORY(IP_KGEMAX,NKPTS,'KGEMAX')
AH>         CALL AZZERO(KGEMAX,NKPTS)
AH>         CALL MEMORY(IP_KCNORM,NKPTS,'KCNORM')
AH>         CALL AZZERO(KCNORM,NKPTS)
AH> ck                         ! < -- convert Angstrom to Bohr
AH>       IF(.NOT.BOHR) THEN
AH>          DO I=1,3
AH>             COORD_FDIFF(I) = COORD_FDIFF(I)*FBOHR
AH>          END DO
AH>          R_FDIFF = R_FDIFF*FBOHR
AH>       END IF
AH> ck                         ! < -- convert Angstrom to Bohr
AH>       ENDIF


the better solution here would be to re-broadcast the converted
values (and thus make sure they are bitwise identical). e.g. by
inserting at line 1324 of setsys.F (please don't modify setsys.f
only change the .F files or else they will be overwritten on 
recompiles!):

C     FDIFF
      MSGLEN= 4 * 8
      CALL MY_BCAST(COORD_FDIFF,MSGLEN,SOURCE,ALLGRP)

 
AH> 
AH> Also, purely cosmetic, I added an IF(PARENT) to the write statement on
AH> line 307 of secder.f

this would be line 387 of secder.F.

thanks for pointing out the problem. i'll send
in a proper patch for inclusion into the cvs,
so it will be fixed in the next release.

cheers,
   axel.



AH> 
AH>                IF(PARENT) WRITE(*,'(A,I7,4X,A4,4X,A,T54,1PE12.5)')
AH>      $              " **** ATOM=",IAT,EL(IATYP(IS)),"DISTANCE=",DIST
AH> 
AH> Can someone please check this for me?  Did I make any mistakes?
AH> 
AH> Thanks,
AH> 
AH> Chris Knight
AH> 
AH> 
AH> Ali
AH> 
AH> _______________________________________________
AH> CPMD-list mailing list
AH> CPMD-list at cpmd.org
AH> http://cpmd.org/mailman/listinfo/cpmd-list
AH> 

-- 
=======================================================================
Axel Kohlmeyer   akohlmey at cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.


More information about the CPMD-list mailing list