Hi Santosh,
Here is an alternative to methods mentioned earlier. If you get the
latest version of the cctbx or cci_apps (from www.phenix-online.org) you
will find a new application named phenix.xmanip (or mmtbx.xmanip if you
only download the cctbx).
xmanip has some useful features, one of them is that one can provide
pieces of python code to the interface that will be executed. You have
full access to all cctbx methods available.
Please find below an example parameter file that perform structure
factor calculation (in less than 90 lines of code and input) that
includes elements with f" and f' not being equal to zero (you have to
set the values of f" and f' yourself rather then rely on lookup tables
by wavelength) and allows you to set bulk solvent parameters such as
ksol, bsol and the overall anisotropic B of the data (B_cart).
Save the text below (between the hash-es in a file named params.def ,
change the unit cell and sg parameters, the input pdb file and f" and f'
value dictionary to suit your needs:
( like
fp_dict = { "S": 0, "C": 0 }
fdp_dict = { "S": 0, "C": 2.8 }
for instance }
You can fool around with solvent density, solvent B, overall scale
factor and overall anisotropic B value and resolution (d_min).
Then run
phenix.xmanip params.def
and get a file named xmanip.mtz that will contain your error free data.
If you want, you can add uniform or Gaussian errors yourself.
Since xmanip is fairly new, you will find a bug in the current release
that somehow appears when you do not read in any external xray data.
This happens however right after the mtz file in question has been
written out. This will be fixed in the forthcoming release (soonish).
Let me know if anything is unclear or if you have trouble running it.
HTH
Peter Zwart
###################################################################
xmanip {
input {
unit_cell = "80.127 80.127 71.582 90.00 90.00 120.00"
space_group = R3:H
model {
file_name = tst.pdb
}
}
parameters {
action = reindex manipulate_pdb *manipulate_miller
manipulate_miller {
task = get_dano get_diso lsq_scale sfcalc *custom None
output_label_root = "Imock"
custom{
code = """
#-------------------------------------------------------
# This you can change if desired
#
# Dictionary for fp and fpp values
fp_dict = { "Zn": -0.189 }
fdp_dict = { "Zn": 4.898 }
# final resolution of the data
d_min = 2.0
# anisotropic B value
b_cart = [ 0, 0, 0, 0, 0, 0 ]
# solvent parameters
k_sol = 0.35
b_sol = 45.0
# overall scale
k_overall = 1.0
#-------------------------------------------------------
# below this point, things should be more or less okai
#
from mmtbx import f_model
from cctbx.xray import observation_types
#loop over all scatterers in the xray structure
#print >> out, dir(xray_structure)
scatterers = xray_structure.scatterers()
for atom in scatterers.as_1d():
if fp_dict.has_key( atom.element_symbol() ):
atom.fp = fp_dict[ atom.element_symbol() ]
if fdp_dict.has_key( atom.element_symbol() ):
atom.fdp = fdp_dict[ atom.element_symbol() ]
#the changes have been made to fp and fdp
#Now we have to do some trickery to get some fobs with bulk solvent
#contribution ...
#First make a 'fake' set of f_obs
fake_f_obs = abs(xray_structure.structure_factors(
d_min = d_min,
anomalous_flag = True ).f_calc())
# make a 'fake' set of free flags
fake_free_flags = fake_f_obs.generate_r_free_flags(fraction = 0.1,
max_free = 99999999)
fmodel = f_model.manager( xray_structure = xray_structure,
r_free_flags = fake_free_flags,
target_name = "ls_wunit_k1",
f_obs = fake_f_obs,
b_cart = b_cart,
k_sol = k_sol,
b_sol = b_sol,
overall_scale = k_overall )
# now get the final values of F+ and F-.
# Note the abs to get amplitudes only
result = abs( fmodel.f_model() ).set_observation_type(
observation_types.amplitude() )
# you want make this into intensities?
result = result.f_as_f_sq()
# lets leave the intensities alone for now, and just make 'mock' sigmas
# to statisfy certain programs.
# Don't forget to set the observation type!
sigmas = result.data()/100.0
result = result.customized_copy(data = result.data(),
sigmas=sigmas).set_observation_type(result)
#By default, a parameter named result is passed back to the xmanip
#routines and will be written to the final mtz file
"""
}
}
}
output {
logfile = "xmanip.log"
hklout = "xmanip.mtz"
xyzout = "xmanip.pdb"
}
}
###################################################################
Santosh Panjikar wrote:
Hi all,
Does anybody have a program which can calculate anomalous differences or
F+ and F- from a refined structure at given wavelength and resolution ?
Thanks
Santosh
Santosh Panjikar, Ph.D. [EMAIL PROTECTED]
Staff Scientist
EMBL Hamburg outstation http://www.embl-hamburg.de/~panjikar/
DESY, Notkestrasse 85 Tel.:+49-40-89902-141
22603, Hamburg, Germany Fax: +49-40-89902-149