localPackages.vasp-gpu: enable OPTCELL patch

This commit is contained in:
陈浩南 2024-02-24 18:57:48 +08:00
parent 100f5241b1
commit 7458744a1f
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,22 @@
SUBROUTINE CONSTR_CELL_RELAX(FCELL)
USE prec
REAL(q) FCELL(3,3)
LOGICAL FILFLG
INTEGER ICELL(3,3)
INQUIRE(FILE='OPTCELL',EXIST=FILFLG)
IF (FILFLG) THEN
OPEN(67,FILE='OPTCELL',FORM='FORMATTED',STATUS='OLD')
DO J=1,3
READ(67,"(3I1)") (ICELL(I,J),I=1,3)
ENDDO
CLOSE(67)
DO J=1,3
DO I=1,3
IF (ICELL(I,J)==0) FCELL(I,J)=0.0
ENDDO
ENDDO
ENDIF
RETURN
END SUBROUTINE

View File

@ -42,7 +42,11 @@ let
hashMode = "recursive"; hashMode = "recursive";
message = "Source file not found."; message = "Source file not found.";
}; };
configurePhase = "cp ${include version} makefile.include"; configurePhase =
''
cp ${include version} makefile.include
cp ${./constr_cell_relax.F} src/constr_cell_relax.F
'';
enableParallelBuilding = true; enableParallelBuilding = true;
buildInputs = [ mkl hdf5 wannier90 ]; buildInputs = [ mkl hdf5 wannier90 ];
nativeBuildInputs = [ gfortran rsync which ]; nativeBuildInputs = [ gfortran rsync which ];