%PDB_Demo.m % Demonstrate how we predict SAXS data from a PDB file. % Apomyoglobin structure stored in file, '1BVC.pdb'. fname = '1BVC.pdb'; result = PDB_Geometry(fname); % assess scattering info. %Structure result has lots of scattering info. %key features are, fprintf(1,'\nPredicted Excess Number of Electrons - %f.', result.Ne_excess); fprintf(1,'\nPredicted Radius of Gyration = %f Angstroms.',result.Rg_contrast); %Plot normalized SAXS pattern - I versus q. figure(1); clf; semilogy(result.Ivq(:,1), result.Ivq(:,2)); xlabel('Q (A^{-1})'); ylabel('I (normalized Units)'); title('Normalized SAXS pattern'); axis([0 0.5 0.005 1.0]); % Try to compute experimental signal. Ne = result.Ne_excess; % Number of electrons per scatterer C = 10/16700; % Concentration of protein is 10mg per ml with molecular weight of 16700 g/mol. % Thus this is a 0.0006 M solution l = 0.002; % Pathlenth of X-rays through sample is 2mm T = 0.1; % Only 10% of X-rays make it through the sample cell. flux = 1e11; % X-rays per second incident on the sample. time = 100; % Take a 100 second exposure. ADUperXray = 1.5; % Pressume the ADU counts at the detector per x-ray is 1.5. Spec_to_Phos = 800/0.087; % Distance from sample to detector in units of detector pixels. scaled_data = Rel_Scat(result.Ivq, Ne, C, l, T, flux, time, ADUperXray, Spec_to_Phos) % Scaled data now has the Intensity at the detector as a function of q. figure(2); plot(scaled_data(:,1), scaled_data(:,2)); xlabel('Q (A^{-1})');ylabel('I (ADUs per pixel)'); title('Computed Scattering from ApoMyoglobin'); axis([0 0.5 0 400]);