GarmanGroup / RADDOSE-3D

Time and space resolved simulations of X-ray induced damage to crystals
http://raddo.se
GNU Affero General Public License v3.0
11 stars 7 forks source link

syntax for microcrystals in lipid stream #10

Closed ptrber closed 3 years ago

ptrber commented 6 years ago

Would like to calculate radiation exposure on micro crystals embedded in a lipid stream that continuously flow across the X-ray beam in a serial millisecond experiment (SMX) -Kind of like a SAX experiment with a container environment but here the environment around the crystals is a grease or lipid mixture. -The crystal may tumble slightly during the X-ray exposure, so a minor rotation angle may be useful. Grateful for tips how to start a raddose simulation in this SMX case.

jdickerson95 commented 6 years ago

Hi, so RADDOSE-3D hasn't yet been optimised for serial cystallography, it's not trivial but it is possible to get a reasonable estimate of the dose absorbed by a single microcrystal. I've attached an input file that has a lot of the inputs you may want to use and will go through them now MyInput.txt

The first thing that you will need to do is calculate the exposure time, how long a crystal is expected to be in the beam. If you take this as when half the crystal enters the beam to when half exits, it is reasonable to assume the crystal is fully irradiated for the beam for that exposure time. However, it may be a more accurate representation to offset the crystal and translate it through the beam. It is necessary to apply a rotation here and this may also serve to represent some tumbling. If a small rotation is applied, it is necessary to reduce the angular resolution.

There are a few extra features which could also be used to improve the accuracy. One could apply a lipid container to attenuate the beam. However, attenuation is small so this is unlikely to change the calculated dose much.

The final thing you could try is to run the new photoelectron escape and simulate photoelectrons from both the surrounding and the crystal. You would need to set OILBASED to true and set the concentration of all atoms using SURROUNDINGHEAVYCONC. I'm going to change this so the elements and density can be used instead for a lipid surrounding, and may be released shortly. This should be the most accurate dose calculation, but will significantly increase the runtime so you may need to be patient for it to run.

I hope this helps, let me know if you have more questions. Josh

ptrber commented 6 years ago

Hi Josh, thanks for your help. Please see attached input file. Average Diffraction Weighted Dose comes up as 0 when I run it as is. We use high vacuum silicone grease. Perhaps that doesn't make any difference to the container effect with C3H8. What do you think can be changed in the input file? Peter

On Wed, 22 Aug 2018 at 20:14, jdickerson95 notifications@github.com wrote:

Hi, so RADDOSE-3D hasn't yet been optimised for serial cystallography, it's not trivial but it is possible to get a reasonable estimate of the dose absorbed by a single microcrystal. I've attached an input file that has a lot of the inputs you may want to use and will go through them now MyInput.txt https://github.com/GarmanGroup/RADDOSE-3D/files/2309795/MyInput.txt

The first thing that you will need to do is calculate the exposure time, how long a crystal is expected to be in the beam. If you take this as when half the crystal enters the beam to when half exits, it is reasonable to assume the crystal is fully irradiated for the beam for that exposure time. However, it may be a more accurate representation to offset the crystal and translate it through the beam. It is necessary to apply a rotation here and this may also serve to represent some tumbling. If a small rotation is applied, it is necessary to reduce the angular resolution.

There are a few extra features which could also be used to improve the accuracy. One could apply a lipid container to attenuate the beam. However, attenuation is small so this is unlikely to change the calculated dose much.

The final thing you could try is to run the new photoelectron escape and simulate photoelectrons from both the surrounding and the crystal. You would need to set OILBASED to true and set the concentration of all atoms using SURROUNDINGHEAVYCONC. I'm going to change this so the elements and density can be used instead for a lipid surrounding, and may be released shortly. This should be the most accurate dose calculation, but will significantly increase the runtime so you may need to be patient for it to run.

I hope this helps, let me know if you have more questions. Josh

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GarmanGroup/RADDOSE-3D/issues/10#issuecomment-414983710, or mute the thread https://github.com/notifications/unsubscribe-auth/ANYvRKTi7E1jpjsfTkbFaeEyhE_Du0Fmks5uTS8egaJpZM4WG6pf .

Save this in a file of your choice (here we'll call it "MyInput.txt"). We can then open up a terminal/command prompt, change directory to wherever the RADDOSE-3D executable jar file is located and run:

#

java -jar raddose3d.jar -i path/to/MyInput.txt

##############################################################################

Crystal Block

##############################################################################

Crystal

Type Cuboid # Cuboid Dimensions 15 15 20 # Dimensions of the crystal in X,Y,Z in µm. PixelsPerMicron 1 # The computational resolution AbsCoefCalc EXP # calculate the Absorption coefficients from PDB entry Pdb 4rlm

SolventHeavyConc Na 0

A container can be specified to attenuate the beam

CONTAINERMATERIALTYPE Elemental MATERIALELEMENTS C 3 H 8 CONTAINERTHICKNESS 50 # thickness in um CONTAINERDENSITY 1.2 #g/ml

Simulate photoelectrons from the crystal and the surrounding

CALCULATEPEESCAPE TRUE CALCSURROUNDING TRUE OILBASED TRUE SURROUNDINGHEAVYCONC C 81800 H 218000 # concentration in mM GONIOMETERAXIS 0

ContainerMaterialType elemental

MaterialElements O 2 Si 1

ContainerThickness 50

ContainerDensity 2

##############################################################################

Beam Block

##############################################################################

Beam

Type Gaussian # Gaussian profile beam Flux 2.4e12 # in photons per second (2e12 = 2 * 10^12) FWHM 22 12 # in µm, vertical by horizontal for a Gaussian beam Energy 13.0 # in keV

Collimation Rectangular 66 36 # Vertical/Horizontal collimation of the beam

For 'uncollimated' Gaussians, 3xFWHM

                            # recommended

##############################################################################

Wedge Block

##############################################################################

Wedge 0 1 # Start and End rotational angle of the crystal

                      # Start < End

ExposureTime 0.293 # Total time for entire angular range in seconds

AngularResolution 0.05 # Only change from the defaults when using very

                      # small wedges, e.g 5°.

Wedge 0 0 # Start and End rotational angle of the crystal

Start < End

ExposureTime 0.290 # Total time for entire angular range in seconds

StartOffset 0 -25 0

TranslatePerDegree 0 5 0

AngularResolution 0.01 # Only change from the defaults when using very

small wedges, e.g 5�.

jdickerson95 commented 6 years ago

So the problem here is with the offset and translation of the beam. The beam and crystal are centre on 0 0 0 and the offset will move the crystal by the specified number of micrometres. Currently, the translation only works if rotation is applied and for translates a specified number of micrometres for each degree rotated. So a 1 degree rotation would need to be applied.

I would suggest changing the StartOffset to when the crystal would enter the tails of the beam and then the TranslatePerDegree for 1 degree rotation would be the total distance travelled before it exits the beam. The exposure time would be adjusted accordingly for this distance travelled. I'll attach an other input file at the bottom. In my example, the centre of the crystal crystal starts off centred at 0 -25 0 and takes 0.290 seconds to travel 50 micrometres and be centred at 0 25 0 Getting the ExposureTime, StartOffset and TranslatePerDegree to accurately represent the situation is what will be key to an accurate dose.

The container (which attenuates the beam) and surrounding (simulates photoelectrons from the surrounding) are not as important to the dose calculation but I've put them in the input below. The oildensity and oilelements for the surrounding is new yesterday so will only work in the version I released yesterday.

Hope this helps, MyInput.txt

Josh

ptrber commented 6 years ago

Thanks for that. I follow what you mean. I cloned your latest version from github, compiled it with ant jar and ran the input file you pasted in the thread. Tested different rotation angles. wedge 0 2 gives ADWD = 0.041903 MGy and wedge 0 1 = 0.158798 MGy ADWD with everything else equal. Didn't expect to see that 1 deg less in total rotation during the translation make nearly 4 times higher ADWD. Does it make sense?

Peter

On Wed, 22 Aug 2018 at 20:14, jdickerson95 notifications@github.com wrote:

Hi, so RADDOSE-3D hasn't yet been optimised for serial cystallography, it's not trivial but it is possible to get a reasonable estimate of the dose absorbed by a single microcrystal. I've attached an input file that has a lot of the inputs you may want to use and will go through them now MyInput.txt

The first thing that you will need to do is calculate the exposure time, how long a crystal is expected to be in the beam. If you take this as when half the crystal enters the beam to when half exits, it is reasonable to assume the crystal is fully irradiated for the beam for that exposure time. However, it may be a more accurate representation to offset the crystal and translate it through the beam. It is necessary to apply a rotation here and this may also serve to represent some tumbling. If a small rotation is applied, it is necessary to reduce the angular resolution.

There are a few extra features which could also be used to improve the accuracy. One could apply a lipid container to attenuate the beam. However, attenuation is small so this is unlikely to change the calculated dose much.

The final thing you could try is to run the new photoelectron escape and simulate photoelectrons from both the surrounding and the crystal. You would need to set OILBASED to true and set the concentration of all atoms using SURROUNDINGHEAVYCONC. I'm going to change this so the elements and density can be used instead for a lipid surrounding, and may be released shortly. This should be the most accurate dose calculation, but will significantly increase the runtime so you may need to be patient for it to run.

I hope this helps, let me know if you have more questions. Josh

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jdickerson95 commented 6 years ago

It's not the rotation itself that is making the difference it is the translate per degree. If you change the number of degrees rotated from 1 to 2, then the translate per degree will need to be halved. Otherwise, the crystal will be be moving twice as far in the given time, so will move out of the beam volume much faster and into an area with no beam. A small change in rotation should only make a few % difference to the dose.

Josh

ptrber commented 6 years ago

ok for my understanding of translate per degree. With wedge = 0 10 and translate per degree = 0 5 0 the translation of the crystal will the same distance as wedge = 0 1 and translate per degree = 0 50 0 but tumble 10 deg instead of 1 over the distance of 50um? Peter

On Sun, 26 Aug 2018 at 22:16, jdickerson95 notifications@github.com wrote:

It's not the rotation itself that is making the difference it is the translate per degree. If you change the number of degrees rotated from 1 to 2, then the translate per degree will need to be halved. Otherwise, the crystal will be be moving twice as far in the given time, so will move out of the beam volume much faster and into an area with no beam. A small change in rotation should only make a few % difference to the dose.

Josh

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GarmanGroup/RADDOSE-3D/issues/10#issuecomment-416034826, or mute the thread https://github.com/notifications/unsubscribe-auth/ANYvRDymFZWqtB9Is2RE8X9loCtxdNGmks5uUpGVgaJpZM4WG6pf .

jdickerson95 commented 6 years ago

Yes that's exactly right. Josh