/path/to/redchi file_containing_commands.inp > output.log
# this is a comment
debug fileio fit parser
# I/SIGI/FP/SIGFP
read mtz "data/input_file.mtz"
# calculate Fc and Fs from PDB file
read pdb fc "data/model_highres.pdb"
# set up labels (only input labels are necessary,
# but this also sets up the output MTZ labels)
fsigf "F,SIGF" flag "FreeR_flag"
# crystal settings
bins 10
cvflag 0
# select all atoms
select "group1" "*"
# refine xyz per-atom
xyz_refine individual "group1"
# could also be done this way:
# xyz_refine individual
# refine individual istropic thermal displacements
adp_refine individual isotropic "group1"
# figure out occupancy refinement automatically
# (atoms with alternate conformers will be refined, etc.)
occ_refine auto "group1"
# add hydrogens to the input file
set add_h on
# carry out refinement and calculate the reduced chi
refine mlf 10
# graph the scaled Fo's, sigFo's and Fc's values as a function of
# resolution (this requires that Grace be installed) for all the
# possible default symbols, see the input file commands list
graph "F,SIGF" "FC,PHIC"
# write out the new data
write pdb "output.pdb"
write mtz "output.mtz"
     
fsigf "F,SIGF"
cvflag 0
xyz_refine individual
adp_refine individual isotropic
occ_refine auto
set add_h on
graph "F,SIGF" "FC,PHIC"
# write out the new data
write pdb "output.pdb"
write mtz "output.mtz"
     /path/to/redchi -m input.mtz -p input.pdb file_containing_commands.inp > output.log
read mtz "input.mtz"
read pdb fc "input.pdb"
fsigf "F,SIGF" flag "FreeR_flag"
bins 10
cvflag 0
# selects all atoms
select "group1" "*"
# only selects chain A
select "group2" "A/*"
# only selects chain B
select "group3" "B/*"
# selects everything *except* chain Z
select "group4" "*" xor "Z/*"
ncs_restrain "ncs1" "group2" "group3" weight 0.2
# don't refine the waters during simulated annealing
xyz_refine individual "group4"
weight xray 1.0
set add_h on
# simulated annealing
refine mlf anneal 5
# turn off xray component to regularize geometry
set include_xray off
# and refine for 10 rounds
refine mlf bfgs2 10
# now refine ADPs
adp_refine individual isotropic "group1"
# turn X-ray term back on
set include_xray on
# refine 10 more rounds
refine mlf bfgs2 10
# output
write pdb "output.pdb"
write mtz "output.mtz"
      1.5.6
 1.5.6