|
由于VTST中chain.F移除了SUBROUTINE chain_stress这部分。解决方式:在VASP官方的chain.F中复制过来,加在 END SUBROUTINE chain_force后面。并在55行PUBLIC :: chain_force后面加入chain_stress。
这是官方源文件的子函数:
- SUBROUTINE chain_stress( stress )
- implicit none
- REAL(q),intent( inout ) :: stress(3,3)
- REAL(q) :: stress_all(3,3,2)
- INTEGER :: node
- IF ( images == 0 ) RETURN
- IF ( spring == -1000 ) RETURN
- #if defined(MPI) || defined (MPI_CHAIN)
- node = comm_chain%node_me
- !======================================================================
- ! Parallel tempering return
- !======================================================================
- IF ( LTEMPER ) THEN
- RETURN
- !======================================================================
- ! VCA average stresses over two images
- !======================================================================
- ELSE IF ( LVCAIMAGES ) THEN
- stress_all(:,:,1:2) = 0
- stress_all(:,:,node) = stress
- #ifndef old_vca
- ! first core in image merges the data
- IF ( comm%node_me == 1 ) THEN
- !! 3x3 stress components and two molecular dynamics streams
- CALLMPI_C( M_sum_d( comm_chain, stress_all(1,1,1), 3*3*2))
- stress(:,:)=stress_all(:,:,1)*VCAIMAGES+stress_all(:,:,2)*(1-VCAIMAGES)
- ELSE
- stress=0
- ENDIF
- ! now sum over all cores in one image
- CALLMPI_C( M_sum_d( comm, stress( 1, 1 ), 3*3 ) )
- #else
- !! 3x3 stress components and two molecular dynamics streams
- CALLMPI_C( M_sum_d( comm_chain, stress_all( 1, 1, 1 ), 3*3*2 ) )
- stress = 0
- stress( : , : ) = stress_all( :, :, 1 ) * VCAIMAGES + stress_all( :, :, 2 ) * ( 1 - VCAIMAGES )
- RETURN
- #endif
- END IF
- #endif
- END SUBROUTINE chain_stress
复制代码 |
评分 Rate
-
查看全部评分 View all ratings
|