Thread: FW: [Apbs-users] Using PyMOL with APBS
Biomolecular electrostatics software
Brought to you by:
sobolevnrm
From: Nathan B. <ba...@bi...> - 2004-01-09 19:09:35
Attachments:
psize.py
|
FYI... The mailing list didn't get Cc'ed before. -- Nathan A. Baker, Assistant Professor Washington University in St. Louis Dept. of Biochemistry and Molecular Biophysics Center for Computational Biology 700 S. Euclid Ave., Campus Box 8036, St. Louis, MO 63110 Phone: (314) 362-2040, Fax: (314) 362-0234 URL: http://www.biochem.wustl.edu/~baker/ > -----Original Message----- > From: Todd Dolinsky [mailto:to...@cc...] > Sent: Friday, January 09, 2004 10:55 AM > To: Nathan A. Baker > Cc: Michael George Lerner > Subject: Re: [Apbs-users] Using PyMOL with APBS > > > Hi Michael - > > I think I can answer the psize-related questions - I've also > attached my > most recent version from our CVS tree, which contains the minor > revisions I'll mention. > > > > > - psize.py doesn't let you specify FADD on the command > line. Is this on > > >purpose? Even if I add in code to make it a valid command > line option, it > > >doesn't do what I want. Later on, I want to draw a > surface 10A from the > > >protein. I need to make sure that the grid is big enough > for that. Can I > > >do that with psize? (I was in a bit of a hurry, so I > added a CADD option > > >(analogous to FADD) and called psize.py with --FADD=20 and > --CADD=20 .. is > > >that the right thing to do?) I'd really like to know the > answer to this > > >question .. I haven't used APBS much, so I have no > intuition for what the > > >grid spacing, etc. should be, and I hope I can just trust my hacked > > >version of psize.py. > > > > As far as I understand, in APBS you don't want the fine grid length to > be larger than the coarse grid length. So when setting the > lengths, we > use the if statement to control this behavior: > > coarse length = CFAC * length > fine length = FADD + length > if fine length > coarse length: fine length = coarse length > > So for default CFAC=1.7 and FADD=20, any length under roughly 29 will > have the same coarse length and fine length. For any length over 29, > FADD should work appropriately. > > I think that your CADD fix will work okay, although you could also > dynamically pick a CFAC that will ensure a large enough grid, > since the > CFAC constant has the same basic purpose as CADD. Say you wanted a > margin of 20A, then you could pick a CFAC such that > > CFAC = 1 + FADD/length > > So that for even small lengths, the spacing would still work (for > FADD=20): > > Length = 10, CFAC = 3, clen = 30, flen = 30 > Length = 50, CFAC = 1.4, clen = 70, flen = 70 > > Although I suppose you'd still have to modify psize.py if you > don't want > to have to preparse the file to find the lengths. But overall, your > CADD fix should work okay. > > > > > > - psize.py can't parse the output of the pqr files that I get from > > >http://nbcr.sdsc.edu/pdb2pqr/ (the web-based PDB2PQR > service). psize.py > > >expects different column alignments (in particular, it > wants the x,y,z > > >coordinates to be in the same positions as they are in PDB > files). I have > > >a really simple Python function that rewrites the pqr > files, but it seems > > >like this should be fixed. My stupid Python function just > does this: > > > > > >linetype,num,aname,res,resn,x,y,z,charge,radius,atype = > line.split() > > >goodLine = '%-6s%5s%5s%4s%6s %8s%8s%8s %6s > %4s%12s'%(linetype,num,aname,res,resn,x,y,z,charge,radius,atype) > > > > > >but it seems to work for me. > > > > This was changed in our CVS tree, but didn't make it into the last > release. In trying to adapt to the various column spacings that can > arise from different pqr files, psize goes on the number of > columns, not > the column location - where this ran into trouble is when one of the > fields was negative and the columns merged together. The fix (which > should work, although please let me know if it does not) is to change > from (in parseInput) > > if string.find(line,"ATOM") == 0: > words = string.split(line[31:61]) > > to > > if string.find(line,"ATOM") == 0: > subline = string.replace(line[30:], "-", " -") > words = string.split(subline) > > since only the x,y,z and charge columns matter. > > > >Also, does anyone have a little script to AMBER parameter files + a > > >PDB file into a PQR file, or should I write it myself? > > I've been working on this for a while now, and as Nathan > mentioned, the > upcoming release of APBS will contain this script. > > Please let me know if you have any other questions relating to the > Python part of APBS! > > Todd > > |