[phenixbb] changing test set flag
Vellieux Frederic
Frederic.Vellieux at ibs.fr
Sat Dec 11 01:39:38 PST 2010
Hi,
What I personally do is to write out the data in CNS / XPLOR format.
You get a series of ASCII records (lines) with (depending on the exact
format which I do not keep in my head)
TEST= 0 [could be TEST = 0 or TEST= 0 or whatever]
TEST= 1
then 2 grep commands
grep "TEST= 0" myfile.hkl > myfile1.hkl
grep "TEST= 1" myfile.hkl > myfile2.hkl
then 2 editor runs (I personally use vi, I think it is possible to do it
with other editors as well)
vi myfile1.hkl
:%s/TEST= 0/TEST= 1/g
:wq! (or shift zz)
vi myfile2.hkl
:%s/TEST= 1/TEST= 0/g
:r myfile1.hkl
:w myfile3.hkl
:q!
[there, you could also use :wq! instead of :w myfile3.hkl and :q!, the
file containing the data you need would be in file myfile2.hkl - I think
you get the idea]
Then it's just a question of converting myfile3.hkl into whatever format
is required by the program you wish to use.
Can't remember if one has to use single or double quotes right now for
the grep commands, it comes automatically to the tip of my fingers when
I perform the operation.
Of course, this requires that the CNS/XPLOR file contains one record
(one line) per HKL. If it is more than one line per reflection, it
becomes a bit more complicated to perform but still feasible.
HTH,
Fred.
Michael Hothorn wrote:
> Dear all,
>
> I used phenix.refine to generate the test set flag for my dataset
> which it did with a value of 1. I now use a program that expects the
> test set flag in the mtz file to be 0. Is there a simple way to change
> the flag from 1 to 0 keeping the flagged reflections identical?
>
> Thanks!
> Michael
> _______________________________________________
> phenixbb mailing list
> phenixbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/phenixbb
>
>
More information about the phenixbb
mailing list