{+ file: sdb_to_sdb.inp +} {+ directory: xtal_phase +} {+ description: Convert a site database file from orthogonal to fractional or from fractional to orthogonal coordinates +} {+ authors: Ralf Grosse-Kunstleve +} {+ copyright: Yale University +} {- Guidelines for using this file: - all strings must be quoted by double-quotes - logical variables (true/false) are not quoted - do not remove any evaluate or define statements from the file -} {- begin block parameter definition -} define( {====================== crystallographic data ========================} {* unit cell parameters in Angstroms and degrees *} {+ table: rows=1 "cell" cols=6 "a" "b" "c" "alpha" "beta" "gamma" +} {===>} a=65.508; {===>} b=72.216; {===>} c=45.035; {===>} alpha=90; {===>} beta=90; {===>} gamma=90; {=========================== input file ==============================} {* input site database file *} {===>} sitedatabase_infile.1="mbp_sites.sdb"; {=========================== manipulation ============================} {* choose the type of transformation *} {+ choice: "orth_to_frac" "frac_to_orth" +} {===>} action="orth_to_frac"; {=========================== output file =============================} {* output site database file *} {===>} sitedatabase_outfile="mbp_sites_frac.sdb"; {===========================================================================} { things below this line do not normally need to be changed } {===========================================================================} ) {- end block parameter definition -} checkversion 1.2 evaluate ($log_level=quiet) @CNS_XTALMODULE:read_multi_sdb (filegroup=&sitedatabase_infile; use_array=store3; fix_array=store4; sg_expected=""; sg_read=$sg_read;) xray a=&a b=&b c=&c alpha=&alpha beta=&beta gamma=&gamma end if (&action = "orth_to_frac") then coor frac end else coor orth end end if @CNS_XTALMODULE:coord_to_sdb (sitedb=$allsites; use_array=store3; fix_array=store4; selection=(all);) @CNS_XTALMODULE:write_sdb (sitedb=$allsites; sg=$sg_read; output=&sitedatabase_outfile;) stop