From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Fri Sep 08 2006 - 19:27:52 CDT

On Fri, 8 Sep 2006, L. Michel Espinoza-Fonseca wrote:

ME> Hi,
ME>
ME> I've been trying to find out how to put the atomic charges of each
ME> atom in my system into the B column of a pdb file. I'll try out the
ME> ionize plugin, but it needs a pdbq-formatted file. The problem is that
ME> I haven't found out how to achieve this. I already have both pdb and
ME> psf files created with psfgen. All comments will be kindly
ME> appreciated!

how about?

set sel [atomselect top all]
$sel set beta [$sel get charge]
$sel writepdb new.pdb

but beware, the beta field has only 3 decimal places
accuracy and most force fields have partial charges up to
 4 decimal places (including the leading zero)...

cheers,
   axel.

ME>
ME> Thanks!
ME> Michel
ME>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.