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.py) 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