James Stroud wrote:
Hello All,

I want to programmatically generate the symmetry mates for a molecule
and write out the files containing the symmetry related molecules. I'm
resisting the urge to reinvent the wheel.

What is the best way to do this? I'd prefer to do it within a python
program using an open source library, but I'd settle for scripting an
external program if that is the only option.

James


If I could dare to mention a CCP4 program on this BB: PDBSET.
The database is a text file called $SYMOP.
To be able to control which other ASU get created, copy the symops from there
into the script.
You also need a CELL line if the .pdb lacks CRYST1
Depending what you're going to do, it may help to rename the new chains.
For P212121:

#!/bin/csh -f
#
#  Make Cell contents
#
pdbset xyzin asu.pdb xyzout unitcell.pdb <<eof-1
symgen X,Y,Z
symgen 1/2-X,-Y,1/2+Z
symgen -X,1/2+Y,1/2-Z
symgen 1/2+X,1/2-Y,-Z
! Rename chains in other ASU
chain symmetry 2   A C
chain symmetry 2   B D
chain symmetry 3   A E
chain symmetry 3   B F
chain symmetry 4   A G
chain symmetry 4   B H
eof-1


then you have the problem Nat mentioned that the result probably will not be
the best approximation to filling one unit cell (that is a hopeless goal
anyway as molecules will always cross cell boundaries)
But you can get a lot closer by adding unit cell translations to the symops and
seeing where it puts the molecules.

substitute Y with 1+y or -1+y (Y-1?)
substitute 1/2+y with -1/2+y, 3/2+y etc
and so on


If you want the results in different files, one for each asu,
include only one of the symops each time you run.

Reply via email to