REM This is a short test script to test the python binding of phaser REM 3/2014 : Updated for Phaser 2.5.6 REM 19/2015 : Windows Version REM ================================================================ echo off echo. >NUL 2>TmpGDHSGF.dat call:EofCat ToxDf TmpGDHSGF.dat cctbx.python < TmpGDHSGF.dat del TmpGDHSGF.dat exit /b REM ================================================================= goto:ToxDf import os from phaser import * i = InputMR_DAT() i.setHKLI(os.environ['CEXAM']+"/toxd/toxd.mtz") i.setLABI("FTOXD3","SIGFTOXD3") o = Output() r = runMR_DAT(i,o) print r.summary() i = InputMR_AUTO() i.setSPAC_HALL(r.getSpaceGroupHall()) i.setCELL6(r.getUnitCell()) i.setREFL(r.getMiller(),r.getFobs(),r.getSigFobs()) i.setROOT("toxd") i.addCOMP_PROT_MW_NUM(7071,1) i.addENSE_PDB_ID("toxd",os.environ['CEXAM']+"/toxd/toxd.pdb",1.0) i.addSEAR_ENSE_NUM("toxd",1) del(r) r = runMR_AUTO(i,o) print r.summary() :ToxDf REM ================================================================= :EofCat ::Should call this function with 2 args, MYDELIM and outFile.txt ::where is to be catted to outFile.txt ::and text starts with goto:MYDELIM ::and ends with :MYDELIM set searchStart=goto:%~1 set searchStop=:%~1 set outFile=%~2 set startLine=0 set endLine=0 for /f "delims=:" %%a in ('findstr -b -n %searchStart% %~dpnx0') do set "startLine=%%a" for /f "delims=:" %%a in ('findstr -b -n %searchStop% %~dpnx0') do set "endLine=%%a" set /a linesLeftToRead=%endLine% - %startLine% del %outFile% if "%linesLeftToRead%" LEQ "0" ( echo Error finding start and end delmieters for %searchStop% in catMyChunk routine exit /B 1 ) setlocal DisableDelayedExpansion for /f "usebackq skip=%startLine% delims=" %%a in (`"findstr /n ^^ %~dpnx0"`) do ( set "oneLine=%%a" set /a linesLeftToRead-=1 setlocal EnableDelayedExpansion set "oneLine=!oneLine:*:=!" if !linesLeftToRead! LEQ 0 exit /B echo(!oneLine!>>%outFile% endlocal ) endlocal goto: EOF REM =================================================================