Skip to content

Wrong pair potential will be used for those pairs not specified in parameter file #76

Description

@chliu1990

In subroutines like PAIRPOTTAB, the part for determine which pair potential to use is like this:

DO K = 1, NOPPS

              IF ((ATELE(I) .EQ. PPELE1(K) .AND. ATELE(J) .EQ. PPELE2(K)) &
                   .OR. (ATELE(J) .EQ. PPELE1(K) .AND. &
                   ATELE(I) .EQ. PPELE2(K))) THEN

                 PPSEL = K

                 R1 = POTCOEF(9,PPSEL)
                 RCUT = POTCOEF(10,PPSEL)
                 RCUT2 = RCUT*RCUT

              ENDIF

           ENDDO

If the pair potential is not defined for a pair of atom, it will use the pair potential function of last loop to compute the pair potential. Maybe it will be better to use zero for these non-existing parameters? It seems set RCUT2=ZERO for those pairs will make it work. (the code just put is wrong, just corrected it)

RCUT2=0
DO K = 1, NOPPS

              IF ((ATELE(I) .EQ. PPELE1(K) .AND. ATELE(J) .EQ. PPELE2(K)) &
                   .OR. (ATELE(J) .EQ. PPELE1(K) .AND. &
                   ATELE(I) .EQ. PPELE2(K))) THEN

                 PPSEL = K

                 R1 = POTCOEF(9,PPSEL)
                 RCUT = POTCOEF(10,PPSEL)
                 RCUT2 = RCUT*RCUT

              ENDIF

           ENDDO

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions