Adxv: Difference between revisions

From XDSwiki
Jump to navigation Jump to search
(New page: == Visualizing XDS data reduction == The latest beta versions of ADXV (from http://www.scripps.edu/~arvai/adxv/) can read spot files (whose name ends with .adx) and display them together ...)
 
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
The ADXV program can be downloaded from http://www.scripps.edu/tainer/arvai/adxv.html . The manual is at https://www.scripps.edu/tainer/arvai/adxv/AdxvUserManual.pdf .
== What if the Image Window doesn't refresh correctly under x2go ? ==
https://wiki.x2go.org/doku.php X2go is based on an old version of the NoMachine NX libraries. These had a bug which must be worked around.
You may have try adding an option to /etc/x2go/x2goagent.options ; earlier versions of the NX software required the following addition to /usr/NX/etc/node.cfg :
AgentExtraOptions="-defer 0"
Finally, try using "adxv -nopixmap"
Please also check out https://wiki.x2go.org/doku.php/doc:de-compat
== Visualizing XDS data reduction ==
== Visualizing XDS data reduction ==


The latest beta versions of ADXV (from http://www.scripps.edu/~arvai/adxv/) can read spot files (whose name ends with .adx) and display them together with the frames.
ADXV can read spot files (whose name ends with .adx) and display them together with the frames.


This is Fortran code for generating these files in the same directory where the frames are (i.e. you need write permission in that directory!):
These spot files can be written by [[generate_adx]]. In adxv's file selection window, it is useful to change the filename pattern from e.g. "*.cbf" to just "*" which then gives you the possibility to load frames and spot files at will.


! generate .adx files from existing XDS.INP and XDS_ASCII.HKL
If using ADXV on a NoMachine (NX) desktop, it is useful to know that one needs the -nopixmap commandline option if the frame is not correctly displayed (I found that the zoom window still does not display correctly).
      implicit none
      integer :: hkl(3),iframe,j=-10000,mini=huge(mini),maxi=-huge(maxi),&
                nref=0,i,i1,i2,num
      real intensity,sigi,x,y,z
      character :: string*80,frmnam*80,form*6='(i0.0)'
      logical :: back=.true.
100  format(5i5)
101  format(a)
! find out NAME_TEMPLATE_OF_DATA_FRAMES
      open(1,file='XDS.INP')
        do
          read(1,101,end=98) string
          string=adjustl(string)
          if (string(:29)=='NAME_TEMPLATE_OF_DATA_FRAMES=') then
            frmnam=adjustl(string(30:))
            i1=index(frmnam,'!')
    if (i1>0) frmnam=frmnam(:i1-1)
            frmnam=frmnam(:index(frmnam,'.',back))//'adx' ! exchange extension
          endif
        end do
  98  close(1)
      print*,'.adx names :',frmnam(:len_trim(frmnam))
! prepare modification of framename
      i1=index(frmnam,'?')
      i2=0
      do i=i1,80
        if (frmnam(i:i)=='?') then
          i2=i
        else
          exit
        endif
      end do
      if (i2==0) stop 'template should contain a ?'
      write(form(3:3),'(i1)') i2-i1+1
      form(5:5)=form(3:3)
! sort XDS_ASCII.HKL by frame number
      print*,'sorting XDS_ASCII.HKL ...'
      call system('grep -v \! XDS_ASCII.HKL | sort -k 8n > temp_adx.sort')
      open(1,file='temp_adx.sort')
      print*,'sorting XDS_ASCII.HKL done'
     
      num=10000
      do
        read(1,*,end=99)hkl,intensity,sigi,x,y,z
        iframe=int(z)+1
        mini=min(iframe,mini)
        maxi=max(iframe,maxi)
        nref=nref+1
        if (mod(nref,num)==0) then
          print*,'working',num
          num=num*2
endif
        if (iframe/=j) then  ! new frame
          write(frmnam(i1:i2),form) iframe
          if (j/=-10000) close(2)
          open(2,file=frmnam)
          j=iframe
        endif
! XDS starts counting at 1, whereas ADXV starts at 0:
        write(string,100) nint(x)-1,nint(y)-1,hkl
        call removeblanks(string)
        write(2,101)string(:len_trim(string))
      end do
  99  print*,'first frame, last frame, nref=',mini,maxi,nref
      close(1,status='delete')
      close(2)
      end     
!
      subroutine removeblanks(string)
! Removes leading and trailing blanks, and turns multiple blanks into one blank.
      implicit none
      character string*(*),copy*80
      integer i,j
      logical first
      j=0
      first=.false.
      do i=1,len_trim(string)
        if (string(i:i) /= ' ') then
          j=j+1
          copy(j:j)=string(i:i)
          first=.true.
        elseif (first) then
          j=j+1
          copy(j:j)=string(i:i)
          first=.false.
        endif
      end do
      string=copy(1:j)
      end

Latest revision as of 18:12, 19 March 2021

The ADXV program can be downloaded from http://www.scripps.edu/tainer/arvai/adxv.html . The manual is at https://www.scripps.edu/tainer/arvai/adxv/AdxvUserManual.pdf .


What if the Image Window doesn't refresh correctly under x2go ?

https://wiki.x2go.org/doku.php X2go is based on an old version of the NoMachine NX libraries. These had a bug which must be worked around.

You may have try adding an option to /etc/x2go/x2goagent.options ; earlier versions of the NX software required the following addition to /usr/NX/etc/node.cfg :

AgentExtraOptions="-defer 0"

Finally, try using "adxv -nopixmap"

Please also check out https://wiki.x2go.org/doku.php/doc:de-compat


Visualizing XDS data reduction

ADXV can read spot files (whose name ends with .adx) and display them together with the frames.

These spot files can be written by generate_adx. In adxv's file selection window, it is useful to change the filename pattern from e.g. "*.cbf" to just "*" which then gives you the possibility to load frames and spot files at will.

If using ADXV on a NoMachine (NX) desktop, it is useful to know that one needs the -nopixmap commandline option if the frame is not correctly displayed (I found that the zoom window still does not display correctly).