[chimera-dev] attribute assignment

Elaine Meng meng at cgl.ucsf.edu
Fri May 1 14:33:53 PDT 2009

Hi David,
There are several issues, so many that I must summarize up top so you  
don't get lost in the longer explanations below.  Summary:

- file format is wrong
- if you want carboxylate, the atom type is O2- not O2
- even changing atom type to O2- won't do what you want because those  
groups already have hydrogens. Just remove the hydrogens!  Then you  
don't even have to change any atom types.

(A) How to assign attributes.  The proximal answer to your question  
is that the format of your attribute assignment file is wrong.  It is  
always better to look in the User's Guide (see the Help menu in  
Chimera, which includes a search option) than in the mail archives,  
because the archives can have outdated information, and because the  
mail list server can annoyingly mess up files with particular formats  
or @ symbols in them (bingo).  Using the Help menu shows the  
documentation included with your download.  The same documentation is  
also on our web site, and here's the page that describes the  
attribute assignment format:
There are also example files linked to that page.

Your file contains (mail list readers beware, the server will  
probably mess this up):
attribute: idatmType
match mode: 1-to-1
	:ADA 4  @ om	O2
	:ADA 5  @ om 	O2
	:ADA 6  @ om	O2
	:ADA 7  @ om	O2
	:ADA 8  @ om	O2
	:ADA 9  @ om	O2
	:ADA 10 @ om 	O2

The atom specifications in the first tab column of the assignment  
lines are wrong; they should be the same syntax that would work in  
the command line, for example ":4 at om".  You can always test  
beforehand whether some specification gets what you want by using it  
in the command line, for example using the command:

select :4 at om

Command-line specification is documented here:

Actually, to assign a single value nowadays, you would just use the  
setattr command, for example:

setattr a idatmType O2 :4-10 at om

(making sure to type capital O and not zero 0 in the atom type)

(B) Making the groups negatively charged carboxylates.  Your subject  
line is "add h" but your message talks about adding charge, and your  
assignment file attempts to assign idatmType ...  confusing.  I guess  
you are ultimately assigning charge with Add Charge but wanted to set  
atom types to get a certain protonation state.  However, those atoms  
already all have the atom type O2.  Type O2 is neutral carbonyl.   
Carboxylate oxygen is O2- as shown in this page:

I can tell the atom  types by selecting the atoms and labeling them  
by atom type, for example with the commands:
select :4-10 at om
labelopt info idatmType
label sel

(the same stuff could be done with the menu but it would take longer  
to explain)

If you mean you want all the groups at atoms named C6 to be  
negatively charged carboxylates, you only need to remove the  
hydrogens that are already on them.  You don't even have to change  
any atom types.  E.g. commands:

delete element.H
addcharge all method gas

(again these could be done with menus/GUIS).  My example commands use  
the Gasteiger charge method; I couldn't get the other method to work  
on this structure, and we may look into that further, but hopefully  
Gasteiger charges will suffice.

(D) If some other researchers have already figured out good partial  
charges for these residues, you could just put them in an attribute  
assignment file and assign the attribute named charge directly  
instead of using the Add Charge tool or command addcharge.

(E) residues 1-3 in the structure strangely include some extra  
hydrogens not connected to anything... yet another reason to just  
delete the original hydrogens, as in (C).

I hope this helps,
Elaine C. Meng, Ph.D.                          meng at cgl.ucsf.edu
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

P.S. in general user questions are more appropriate for chimera- 
users at cgl.ucsf.edu than for chimera-dev (programmer issues), but I  
see the archive mail you were looking at was sent to chimera-dev for  
some reason

On Apr 30, 2009, at 11:18 PM, Davide Mercadante wrote:

> Hi Elaine,
> I am a PhD student studying interactions between carbohydrates and
> proteins and I am trying to add charges to a molecule that I have  
> to use
> for a simulation.
> I have followed the guidelines that you give in:
> http://www.cgl.ucsf.edu/pipermail/chimera-dev/2004/000312.html
> But doesn't work as I want...
> My molecule is not a protein in this case but an oligosaccharide of  
> ten
> residues long. I have written the pdb file using the server sweet  
> II and
> now I am trying to add charges on the carboxylate groups present in  
> the
> structures.
> I attach the pdb file and the attribute file that I have created in  
> this
> mail.
> The atoms where I would like to add the charges are the OM atoms
> specified in the pdb file for each ADA residue.
> However, when I try to give the attribute to the atoms chimera  
> replies:
> "Data line 1 or file either not selector/value or not tab-delimited"
> Please, can you help me to solve this problem and tell me what I  
> wrong?
> Thanks in advance for your help.
> Cheers,
> Davide
> Davide Mercadante Ph.D.
> Department of Chemistry
> The University of Auckland, Auckland
> New Zealand<10mer30%Me_B.pdb><attribute10mer30% 
> Me_B>_______________________________________________

More information about the Chimera-dev mailing list