Dear Chris,

The script might work technically, but applying the same 
transformation matrix 100 times to the output of the previous 
iteration is a recipe for disaster. PDB files only store 
coordinates to 3 decimal places and your rounding errors will 
build up horribly.

Far better to work out the transformation matrix/vector 
required for each iteration and apply that set to the original 
coordinates.


Regards,
Robert

--

Dr. Robert Esnouf,
University Research Lecturer
and Head of Research Computing,
Wellcome Trust Centre for Human Genetics,
Roosevelt Drive, Oxford OX3 7BN, UK

Emails: rob...@strubi.ox.ac.uk   Tel: (+44) - 1865 - 287783
    and rob...@esnouf.com        Fax: (+44) - 1865 - 287547


---- Original message ----
>Date: Wed, 27 Jun 2012 09:03:13 +0000
>From: CCP4 bulletin board <CCP4BB@JISCMAIL.AC.UK> (on behalf 
of "Froehlich, Chris" <chris.froehl...@mdc-berlin.de>)
>Subject: [ccp4bb] apply a spatial transformation on a pdb 
file n times  
>To: CCP4BB@JISCMAIL.AC.UK
>
>   Dear colleagues,
>
>
>
>   I want to apply a given
>   x-y-z-rotation/transformation matrix on a pdb file,
>   save the new pdb file and apply the same matrix
>   again on the new pdb file and repeat this e.g. 100
>   times, thereby saving all pdb files (i.e. 01.pdb,
>   02.pdb, 03.pdb etc.).
>
>
>
>   With pdbset this is very easy, but I'm wondering if
>   there is any script to do so because I don't want to
>   manually change file names all the time...
>
>   I am not very familiar with scripting, but I found
>   something in the internet.
>
>   Can anybody help please with this i.e. is this a
>   reasonable script to do so?
>
>
>
>   # repeat a spatial transformation on a pdb file n
>   times.
>
>   #!/bin/csh -f
>
>   start n=1 until n=x.
>
>   pdbset xyzin mypdbfile($n).pdb xyzout
>   mypdbfile($n+1).pdb <<eof-1
>
>   transform -
>
>      0.87831   0.47808   0  0  0  -1. -0.47808
>   0.87831   0 0.0  -2.713  0.0
>
>   eof-1
>
>
>
>
>
>   Thanks a lot,
>
>   Chris
>
>
>
>
>
>
>
>
>
>   DIPL.-ING. CHRIS FRÃ*HLICH
>
>   Crystallography Dept. | Daumke group
>   Max-Delbrück-Centre for Molecular Medicine (MDC)
>   Robert-Rössle-Str. 10
>   13125 Berlin-Buch
>   Lab:     +49(0)30-9406-3263
>   Office: +49(0)30-9406-3275
>   Fax:     +49(0)30-9406-3814
>
>
>
>   www.mdc-berlin.de/daumke
>
>

Reply via email to