anchor.diff:         integer i
          do i=1,n
            oc(i)=oc(i).and.(atag(i).eq.mtag)
  -c         oc(i)=index(atag(i),mtag(1:len_trim(mtag))).ne.0
  +c         oc(i)=oc(i).and.index(atag(i),mtag(1:len_trim(mtag))).ne.0
          end do
          end
   
  
positive.code:          if(n.eq.0) exit
           write(*,*) "number of atoms", n
           oc1=.false.
           if(atom1_id.gt.0) then
             oc1=.false.
             oc1(atom1_id) = .true.
           else if(atom1_tag.ne." ") then
             oc1 = atag.eq.atom1_tag
  c           call mask_byname(n,c,atag,oc1,atom1_tag)
           end if
           oc2=.false.
           if(atom2_id.gt.0) then
             oc2(atom2_id) = .true.
           else if(atom2_tag.ne." ") then
             oc2 = (atag.eq.atom2_tag).and.(.not.oc1)
  c           call mask_byname(n,c,atag,oc2,atom2_tag)
           else
             oc2=oc1
           end if
           gr0 = 0
           call rdf_compute2(n,c,oc1,oc2,
       +                    nb,rmax,lat,
  
negative.code:      +                    fn_in)
           gr = gr + gr0
           nf = nf+1
           if(nfrm.gt.0.and.nf.ge.nfrm) then
              write(*,*) "exiting because exceeded number of frames",nf,nfrm
              exit
           end if
  