mmtbx/examples/simulate_experimental_data.py
Hi All, I'm trying to generate some simulated mtz files. My main aim is to test a script which looks to determine ligand occupancy (https://github.com/nelse003/exhaustive_search/blob/master/exhaustive_search....) by looking at |Fo-Fc| over the ligand/ ground-state the ligand replaces. To test this I would like to generate mtz files from pdb models with a ligand occupancy that has varied between 0-1, which the above script would hopefully recover the occupancy. I have tried to use mmtbx/examples/simulate_experimental_data.py (https://github.com/cctbx/cctbx-playground/blob/8f23c190a9f8d2ed2b5845385f568... ) to generate an mtz file. So far I have been able to generate mtz files using the simulate_experimental_data.py, these have the columns: H K L FOBS(+) SIGFOBS(+) FOBS(-) SIGFOBS(-) I can use this outputted mtz for running tests of my scripts ,However as this has no PHI columns, I cannot display this in coot. I have tried to add the phi column from the refined mtz of the orignal data using CAD, but have not yet managed to do this succesfully. I feel that this may be an overcomplicated, and potentially superseded way of generating simulated mtz data. Any advice on alternatives would be really useful? Apologies if this is not very clear. Thanks Elliot Nelson
Hi Elliot,
It looks like you want to calculate Fo-Fc map and have it in .mtz format. I
would suggest to have a look at phenix.maps tool (living in
cctbx_project/mmtbx/command_line/maps.py).
I believe confusion happened because .mtz format can store various things:
experimental data (Fobs), map coefficients or both. You were generating
fake experimental data, which cannot be displayed in Coot because it is not
a map.
Hope it helps,
Best regards,
Oleg Sobolev.
On Thu, Apr 5, 2018 at 1:24 AM, Elliot Nelson
Hi All,
I'm trying to generate some simulated mtz files. My main aim is to test a script which looks to determine ligand occupancy ( https://github.com/nelse003/exhaustive_search/blob/master/ exhaustive_search.py) by looking at |Fo-Fc| over the ligand/ ground-state the ligand replaces.
To test this I would like to generate mtz files from pdb models with a ligand occupancy that has varied between 0-1, which the above script would hopefully recover the occupancy.
I have tried to use mmtbx/examples/simulate_experimental_data.py ( https://github.com/cctbx/cctbx-playground/blob/ 8f23c190a9f8d2ed2b5845385f568f3233c16132/mmtbx/examples/ simulate_experimental_data.py ) to generate an mtz file.
So far I have been able to generate mtz files using the simulate_experimental_data.py, these have the columns:
H K L FOBS(+) SIGFOBS(+) FOBS(-) SIGFOBS(-)
I can use this outputted mtz for running tests of my scripts ,However as this has no PHI columns, I cannot display this in coot. I have tried to add the phi column from the refined mtz of the orignal data using CAD, but have not yet managed to do this succesfully.
I feel that this may be an overcomplicated, and potentially superseded way of generating simulated mtz data. Any advice on alternatives would be really useful?
Apologies if this is not very clear.
Thanks
Elliot Nelson
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Hi Elliot,
I'm trying to generate some simulated mtz files. My main aim is to test a script which looks to determine ligand occupancy (https://github.com/nelse003/exhaustive_search/blob/master/exhaustive_search....) by looking at |Fo-Fc| over the ligand/ ground-state the ligand replaces.
it isn't clear what you are trying to do.. What you call "simulated mtz files". MTZ is just a file format.. What you expect in these MTZ files?
To test this I would like to generate mtz files from pdb models with a ligand occupancy that has varied between 0-1, which the above script would hopefully recover the occupancy.
OK. phenix.fmodel model.pdb high_res=2.3 will calculate Fcalc from given atomic model in model.pdb file. You can pretend it to be Fobs: phenix.fmodel model.pdb high_res=2.3 type=real There is a more sophisticated tool that will actually go to some length trying to mimic actual Fobs data phenix.fake_f_obs It's not documented anywhere.. So have a look at the code to see what it actually does. If you describe what exactly you want to do and how you want to do it, then we may be able to come up with a more tailored to your goal solution. All the best, Pavel
Hi Pavel/ CCTBXBB,
I have used phenix.fmodel to generate structure factors (Fcalc) from given atomic model in merged.pdb file. As previously suggested I am using the type=real flag to populate the Fobs with these Fcalc values:
phenix.fmodel data_column_label="F,SIGF" merged.pdb free.mtz type=real
In the merged.pdb file I set the isotropic B-factor (through u_iso) to a known value (i.e. b=40), and occupancy of the involved ligand/ground state. i.e Occupancy of ligand/ bound state atoms (0.05) and ground state atoms (0.95), all with B Factor =40.
Does phenix.fmodel generate its mtz regarding the B factor of individual atoms?
To give context to this question:
I then use these Fcalc values to test a brute force search of occupancy and b_factor values. I am searching through Fcalc(1)-Fcalc(2) maps, where Fcalc(1) is the Fcalc generated by phenix.fmodel. Fcalc(2) is generated from the same pdb file, but with occupancy and u_iso of atoms in the ligand/ground state varied (occ 0.05 to 0.95, u_iso 0.2 to 1.2). After this search, I look at the mean over points near bound/ground state of |Fcalc(1)-Fcalc(2)|.
My test should be able to uniquely identify the occupancy and B factor values supplied in the merged.pdb file. I can recapitulate the expected occupancy, however I cannot recapitulate this supplied B factor.
Thanks
Elliot
________________________________
From: Pavel Afonine
Hi Elliot,
I have used phenix.fmodel to generate structure factors (Fcalc) from given atomic model in merged.pdb file. As previously suggested I am using the type=real flag to populate the Fobs with these Fcalc values:
phenix.fmodel data_column_label="F,SIGF" merged.pdb free.mtz type=real
flag 'type=real' converts complex value Fcalc to real values.
In the merged.pdb file I set the isotropic B-factor (through u_iso) to a known value (i.e. b=40), and occupancy of the involved ligand/ground state. i.e Occupancy of ligand/ bound state atoms (0.05) and ground state atoms (0.95), all with B Factor =40.
Does phenix.fmodel generate its mtz regarding the B factor of individual atoms?
To calculate Fcalc you need: - coordinates; - ADP (B-factors); - occupancies; - atom scattering type (element and charge if available). (Figure 1 on page 37 here: http://phenix-online.org/newsletter/CCN_2015_07.pdf) that is all information from ATOM record of your PDB file is used (except unnecessary decorators, such as chain and atom labels).
To give context to this question:
I then use these Fcalc values to test a brute force search of occupancy and b_factor values. I am searching through Fcalc(1)-Fcalc(2) maps, where Fcalc(1) is the Fcalc generated by phenix.fmodel. Fcalc(2) is generated from the same pdb file, but with occupancy and u_iso of atoms in the ligand/ground state varied (occ 0.05 to 0.95, u_iso 0.2 to 1.2). After this search, I look at the mean over points near bound/ground state of |Fcalc(1)-Fcalc(2)|.
My test should be able to uniquely identify the occupancy and B factor values supplied in the merged.pdb file. I can recapitulate the expected occupancy, however I cannot recapitulate this supplied B factor.
Since you have all controlled numerical setup, as usual in such cases try to simplify the task by varying one parameter at a time. For example, make sure occupancy search works (given fixed B), then make sure B search works (given fixed q), then vary both and there is no reason that should then not work. Of course there are plenty of details involved here that make this easy or tricky, such as what optimization target you use: real or reciprocal space? If real space, do you make sure to scale maps by volume (absolute scale) and not by rms? What's size of region where you compute 'mean over grid points'? etc etc etc etc. Can't comment more without having more technical details.. Good luck, Pavel
participants (3)
-
Elliot Nelson
-
Oleg Sobolev
-
Pavel Afonine