AdvancedPhotonSource / GSAS-II

Home for GSAS-II: crystallographic and diffraction-based structural characterization of materials
Other
33 stars 14 forks source link

PDB to powder diffraction pattern? Cont Question of #80 #94

Closed candiedhaw closed 2 weeks ago

candiedhaw commented 2 weeks ago

Hello,

I am trying to use PDB data to simulate the powder diffraction pattern with the tutorial that Brian shared: https://advancedphotonsource.github.io/GSAS-II-tutorials/Simulation/SimTutorial.htm Everything else was smooth except the last histogram simulation.

I used my laptop and let it run over the weekend but was unable to finish. After that, I closed my laptop one time without terminating the GSASII and have been keeping it open for a week now: image

Interestingly, after taking the screenshot, now it shows: image

GSASII showing: ` C:\WINDOWS\system32>call C:\Users\dnvxl\gsas2full\Scripts\activate

(base) C:\WINDOWS\system32>C:\Users\dnvxl\gsas2full\python.exe C:\Users\dnvxl\gsas2full\GSASII\GSASII.py "" Python gitpython module not installed Note: git and gitpython are required for GSAS-II to self-update GSAS-II binary directory: C:\Users\dnvxl\gsas2full\GSASII\bindist 7 values read from config file C:\Users\dnvxl\gsas2full\GSASII\config.py Python/module versions loaded: Python: 3.7.1 from C:\Users\dnvxl\gsas2full\python.exe. wx: 4.0.4 matplotlib: 3.3.1 numpy: 1.19.1 scipy: 1.5.2 OpenGL: 3.1.1a1 Image: 8.0.0 (PIL or Pillow) Platform: win32 64bit AMD64 Max threads:2 Latest GSAS-II revision: 5798 (svn SVN version 5798) Note: 2 importer(s) could not be installed. See the "Import->Show importer error(s)" menu command for more information Import path not found - set to current directory Read phase QUINOL:FUMARATE REDUCTASE from file C:\Users\dnvxl\Downloads\4kx6.pdb Added simulation powder data PWDR CW x-ray simulation with parameters from default: APS 30keV 11BM C:\Users\dnvxl\gsas2full\GSASII\GSASIIdataGUI.py:8020: RuntimeWarning: invalid value encountered in true_divide S = -1.0+np.sum(np.log(meanI2/(data[1][1][iBeg:iFin]-meanI)2))/(iFin-iBeg) Added simulation powder data PWDR CW neutron simulation with parameters from C:\Users\dnvxl\Downloads\BT1 (1).prm bank 1 save to file: C:\Users\dnvxl\Desktop\4kx6.gpx project save successful wrote file C:\Users\dnvxl\gsas2full\GSASII\config.py Hessian Levenberg-Marquardt SVD refinement on 8 variables: initial chi^2 1.3453e+10 with 12562 obs.`

Shall I keep it running? Any other suggestion?

Thank you!

briantoby commented 2 weeks ago

A hour or two for a powder diffraction computation of a protein structure I can believe. A week no. This is in an infinite loop.

You should restart. Check that you can get a powder pattern if the computation is run with zero cycles (no refinement).

I'm not sure why you would need to refine parameters, but if you really need to do this, add refinement parameters one or two at a time.

briantoby commented 2 weeks ago

P.S. In the future it is probably better to reopen an older issue (here #80) than start a new one as a continuation.

candiedhaw commented 2 weeks ago

I am pretty sure that I used 0 cycles but I will try it again. Can you have a look at my setting here:

image

Shall I also uncheck the background refine here?: image

briantoby commented 2 weeks ago

No, you have zero cycles set, so something is wrong. Could you put the .gpx file into a .zip and attach? (or you can e-mail it to me directly.)

candiedhaw commented 2 weeks ago

Here is the one that I ran over the weekend: 4kx6.zip I also create a new one with only the 11BM simulation and just start running: 201107pbd.zip

briantoby commented 2 weeks ago

I wanted to look at your 4kx6.gpx file to check that there was nothing wrong with the structure. That looks fine, but I will note this is a huge unit cell (3.6M A^3). The problem here is the data ranges you were using to compute the pattern. With the short x-ray wavelength and the very wide angular range, you were computing millions -- billions? (the number goes as Q^3) -- of reflections. Likewise for neutrons, longer wavelength but much wider angular range. Your computer must have been spending all its time swapping memory in and out of disk to try to compute all that.

I lowered the computation range to something that turns out to be way too wide: 0.1 to 0.5 deg. for x-ray and 0.5 to 20 deg. for neutrons. With that I got ~20K reflections in that range. It took a few minutes to compute the two patterns (somewhere in the range of 2-10 is my guess, I was not watching.) FWIW, with that short angular range, these ranges are huge compared to the amount of detail one will ever see, at least with the resolution of any existing neutron diffractometer (not to mention the huge H background adding noise). Even with 11-BM one is not going to see much structure past a degree or two with this large a cell.

HTH

image

image

candiedhaw commented 2 weeks ago

I just tried and it worked! Thank you SO MUCH!