aboutsummaryrefslogtreecommitdiff
blob: e89da25464b0380920e0edbbf38363fb4eb0c6f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
diff -Naurp bigdft-1.6-tuto.1.orig/src/art/art_lanczos.f90 bigdft-1.6-tuto.1/src/art/art_lanczos.f90
--- bigdft-1.6-tuto.1.orig/src/art/art_lanczos.f90	2011-10-17 08:46:50.000000000 +0000
+++ bigdft-1.6-tuto.1/src/art/art_lanczos.f90	2012-06-22 13:03:49.000000000 +0000
@@ -80,11 +80,30 @@ subroutine lanczos( maxvec, new_projecti
   integer                                  :: i_min
   real(kind=8)                             :: e_min
   !_______________________
+
+  interface
+    !> ART center
+    !! @author
+    !! Written by EM 2010, see ~/AUTHORS 
+    !! It places the center of mass of a 3D vector at (0,0,0). 
+    subroutine center( vector, vecsize )
+
+      use defs, only : natoms, constr
+      use bigdft_forces, only : in_system
+      implicit none
+
+      !Arguments
+      integer, intent(in) :: vecsize
+      real(kind=8), dimension(vecsize), intent(inout), target :: vector
+
+    end subroutine center
+  end interface
+
   newpos = 0.0d0
   diag = 0.0d0
   offdiag = 0.0d0
   lanc = 0.0d0
-  
+
   boxl = box * scala
                                       ! We now take the current position as the 
                                       ! reference point and will make  a displacement
diff -Naurp bigdft-1.6-tuto.1.orig/src/art/calcfo_sw.f90 bigdft-1.6-tuto.1/src/art/calcfo_sw.f90
--- bigdft-1.6-tuto.1.orig/src/art/calcfo_sw.f90	2011-10-17 08:46:50.000000000 +0000
+++ bigdft-1.6-tuto.1/src/art/calcfo_sw.f90	2012-06-22 12:58:35.000000000 +0000
@@ -475,6 +475,28 @@ function diff_square_force_one(P,numnei,
   integer ::  trash_evalf
   real(8), dimension(3*natoms,configs_to_fit) :: force_tempo,tmp_force
 
+interface
+! subroutine to compute forces of one atom
+subroutine SWcalczone(nat,posa,boxl,tmp_force, this_atom,numnei,nei)
+
+
+  use SWpotential
+  use defs, only : boundary,maxnei,iproc,MPI_COMM_WORLD
+  
+  implicit none
+  
+  integer, intent(in)                               :: nat
+  real(kind=8), intent(in), dimension(3*nat) :: posa
+  real(kind=8), dimension(3), intent(inout)          :: boxl
+  integer, intent(in) :: this_atom
+  real(8), intent(out), dimension(3*nat), target:: tmp_force
+
+
+  integer, dimension(nat),intent(in) :: numnei 
+  integer, dimension(nat,maxnei),intent(in) :: nei 
+end subroutine SWcalczone
+end interface
+
   trash_evalf = 0
   my_counter = 0
   force_tempo = force_work_fit