Hi Anasuya - 

One way to generate the dummy zones (i.e. get_zones() from Jason's script) might be to step through the protein chain and create one selection around each residue.  Of course these aren't really random, but you could fairly easily select random values from the list.

####

# initialize a list to store selection strings
stored.zones = []

# use `expand` or `around` depending on whether or not you want to include the starting residue
iterate (name CA), stored.zones.append("br. c. %s and i. %s expand 4.5" % (chain, resi))

python
for i,z in enumerate(stored.zones):
    cmd.select("s%s" % i, z)
python end

####

Hope that helps.

Cheers,
Jared
--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
550 First Ave MSB 398
New York, NY 10016
212-263-7898

On May 1, 2012, at 4:29 AM, Anasuya Dighe wrote:

Hi,
I have around 18000 ligand-bound PDB's. I have as of now, extracted zones of
amino acid residues (say ZONE-1) which are within a radius of 4.5A from the
ligand, for each of the (18000) ligand-bound PDBs with me.
How do I now go about generating, similar RANDOM zones of amino acid residues
occurring over a radius 4.5A, across the protein structure, such that they don't
overlap with each other and ALSO the original ZONE-1 corresponding to that
PDBID?
Lets say, for each of the 18000 PDBIDs that I have, I want to create 5 such
distinct 'dummy' zones of radius 4.5A, with the condition that they dont overlap
with each other and also with my earlier ZONE1.

In simpler terms:
(Original PDB ID)1abc.pdb,
(Zone1 corresponding to 1abc.pdb) 1abc_ZONE1.pdb,
(Five dummy zone1's extracted for the same pdb such that they are not
overlapping with my earlier Zone1 AND WITH EACH OTHER) 1abc_z1_dummy1.pdb,
1abc_z1_dummy2.pdb, 1abc_z1_dummy3.pdb, 1abc_z1_dummy4.pdb, 1abc_z1_dummy5.pdb

How do I modify this existing python script, so that I can generate these dummy
zone1 pdb's?
{ Given I have file_1.txt containing a list of PDBid's, LIgand name, its chain
ID and resi number. }

from pymol import cmd
def process_line(x):
pdbid,res,chain,num = x.split()
cmd.load(pdbid)
cmd.select("zone1","byres all within 4.5 of (chain %s and resn %s and resi %s
and not resn HOH)"%(chain,res,num))
cmd.save("%s-%s-%s-%s-zone1.pdb"%(pdbid,res,chain,num),"zone1")
cmd.delete(pdbid)

def process_all(filename):
for line in open(filename):
  process_line(line)

process_all("file_1.txt")

Thanks.


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net