/******************************************************************************* * McXtrace instrument definition URL=http://www.mcxtrace.org * * Instrument: TestSAXS * * %Identification * Written by: Martin Cramer Pedersen (mcpe@nbi.dk) and Søren Kynde (kynde@nbi.dk) * Date: October 29th, 2012 * Origin: KU-Science * %INSTRUMENT_SITE: Tests * * %Description * Toy model used for testing various sample components for solution-SAXS. * * %Parameters * DistanceFromSourceToFirstPinhole: [m] Distance to first pinhole from source. * DistanceFromSourceToSecondPinhole: [m] Distance to second pinhole - used for focusing rays. * DistanceFromSecondPinholeToSample: [m] Collimation length. * DistanceFromSampleToDetector: [m] Sample-detector-distance. * RadiusOfDetector: [m] Radius of the circular detector. * Lambda: [AA] Wavelength of the rays emitted from source. * DLambda: [ ] Relative deviation of wavelength of the rays emitted from source. * SAMPLE: [ ] Index of sample model * %End *******************************************************************************/ DEFINE INSTRUMENT TestSAXS( DistanceFromSourceToFirstPinhole = 0.05, DistanceFromSourceToSecondPinhole = 0.7, DistanceFromSecondPinholeToSample = 0.6, DistanceFromSampleToDetector = 0.48, RadiusOfDetector = 0.1, Lambda = 1.54, DLambda = 0.01, SAMPLE=0 ) DECLARE %{ %} INITIALIZE %{ %} TRACE COMPONENT Origin = Progress_bar() AT (0, 0, 0) ABSOLUTE COMPONENT Source = Source_flat( xwidth = 0.0005, yheight = 0.0005, dist = DistanceFromSourceToSecondPinhole, focus_yh = 0.0003, focus_xw = 0.0003, lambda0 = Lambda, dlambda = DLambda * Lambda ) AT (0, 0, 0) RELATIVE Origin COMPONENT FirstPinhole = Slit( radius = 0.0002 ) AT (0, 0, DistanceFromSourceToFirstPinhole) RELATIVE Source COMPONENT SecondPinhole = Slit( radius = 0.00015 ) AT (0, 0, DistanceFromSourceToSecondPinhole) RELATIVE Source COMPONENT Sample0 = SAXSSpheres( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, R = 50.0, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector ) WHEN(SAMPLE==0) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample1 = SAXSShells( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector, R = 50.0, Thickness = 20.0 ) WHEN(SAMPLE==1) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole Component Sample2 = SAXSCylinders( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector ) WHEN(SAMPLE==2) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample3= SAXSEllipticCylinders( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector ) WHEN(SAMPLE==3) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample4= SAXSLiposomes( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector ) WHEN(SAMPLE==4) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample5= SAXSNanodiscs( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector ) WHEN(SAMPLE==5) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample6= SAXSNanodiscsWithTags( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector ) WHEN(SAMPLE==6) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample7 = SAXSPDB( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector, PDBFilepath = "3v03.pdb" ) WHEN(SAMPLE==7) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample8 = SAXSCurve( FileWithCurve = "Curve.mcp", xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector ) WHEN(SAMPLE==8) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample9 = SAXSNanodiscsFast( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector ) WHEN(SAMPLE==9) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample10 = SAXSNanodiscsWithTagsFast( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector ) WHEN(SAMPLE==10) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Sample11 = SAXSPDBFast( xwidth = 0.01, yheight = 0.01, zdepth = 0.01, SampleToDetectorDistance = DistanceFromSampleToDetector, DetectorRadius = RadiusOfDetector, PDBFilepath = "3v03.pdb", qMax = 0.9 ) WHEN(SAMPLE==11) AT(0, 0, DistanceFromSampleToDetector) RELATIVE SecondPinhole COMPONENT Beamstop = Beamstop( radius = 0.001 ) AT (0, 0, DistanceFromSampleToDetector - 0.000001) RELATIVE Sample0 COMPONENT Monitor = PSD_monitor( filename = "PSDMonitor", xwidth = 2.0 * RadiusOfDetector / sqrt(2.0), yheight = 2.0 * RadiusOfDetector / sqrt(2.0), nx = 200, ny = 200, restore_xray = 1 ) AT (0, 0, 0.000001) RELATIVE Beamstop COMPONENT QMonitor = SAXSQMonitor( RadiusDetector = RadiusOfDetector, DistanceFromSample = DistanceFromSampleToDetector, LambdaMin = Lambda, Lambda0 = Lambda, NumberOfBins = 2000 ) AT (0, 0, 0.000001000000001) RELATIVE Beamstop FINALLY %{ %} END