Well, yes, a one-liner to move every atom to 1,1,1 would be:
awk '! /^ATOM|^HETAT/{print;next} {print substr($0,1,30) " 1.000
1.000 1.000" substr($0,55)}' whatever.pdb > ref.pdb
Which I suppose is a bit of a long one-liner, but still only one line.
The next line would be a call to "reforigin", or origins.com, using
"ref.pdb" as the reference pdb file. Many other useful one-liners can
be found at DOI: 10.1002/spe.4380090403
Does that help?
-James Holton
MAD Scientist
On 12/18/2017 11:19 AM, Edward A. Berry wrote:
Neat idea!
And do you have a 1-line command for setting all the coordinates to
1,1,1? or 0.1,0.1,0.1 if I still want it near the origin but biased
toward the inside of the positive-going cell?
eab
On 12/14/2017 07:23 PM, James Holton wrote:
What I usually do for this is make a copy of the PDB file and change
all the atom x-y-z positions to "1.000". Then I use something like
reforigin or my "origins.com" script to shift the original
coordinates via allowed symmetry operations, origin shifts, or
perhaps indexing ambiguities until it is as close as possible to the
"reference", which is at 1,1,1. I use 1,1,1 instead of 0,0,0 because
there are generally at least two symmetry-equivalent places that are
equidistant from the origin. Declaring the reference to be a bit
off-center breaks that ambiguity, and also biases the result toward
having all-positive x,y,z values.
In case it is interesting, my script is here:
http://bl831.als.lbl.gov/~jamesh/scripts/origins.com
You need to have the CCP4 suite set up for it to work. Run it with
no arguments to get instructions.
-James Holton
MAD Scientist
On 12/13/2017 5:50 AM, Kajander, Tommi A wrote:
Hello,
If someone could point this out would be very helpful... Wasnt there
a simple script somewhere that would transfer coordinates close to
origin - if they for some reason are not? Just cant find anything
right away. Sure i have done this before...
Thanks,
Tommi