Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chliu1990 opened this issue Jul 13, 2018 · 5 comments

Comments

@chliu1990
Copy link
Contributor

chliu1990 commented Jul 13, 2018

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
@cnegre
Copy link
Collaborator

cnegre commented Jul 13, 2018 via email

@chliu1990
Copy link
Contributor Author

Give an error message will also work. It will not give an error for PPOTON=2. I'm trying to fit the repulsive potential for Fe-C in the table format. In order to do that, I will need to set Fe-C repulsive potential to be zero first. I try both setting Fe-C pair potential to zero or directly remove the Fe-C parameter from ppots.dftb file. The two ways gave very different forces and energy. That's why I open this issue...

@cnegre
Copy link
Collaborator

cnegre commented Jul 13, 2018 via email

@chliu1990
Copy link
Contributor Author

Yes, I can do that. And in fact, that is just what I did. I'm using table format (PPOTON= 2), I just set the second column of the table to be zero for Fe C.

It seems on my computer, for PPOTON= 1, it will not raise an error if a pair parameter is not defined either. (see attached example)
test_ppots.zip

@cnegre
Copy link
Collaborator

cnegre commented Jul 13, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants