Dear List (and Geoffrey),
Finally, I went through the python module depencies and installed
Avogadro 1.1..
On 02/17/2014 10:51 PM, Geoffrey Hutchison wrote:
.. that is the first atom in the system. How do I change its color?
Colors in Avogadro 1.0.x are defined by a color plugin, not the atom. In
Avogadro 1.1.x, there's a new property:
atom.setCustomColorName("red")
http://avogadro.cc/api/dev/classAvogadro_1_1Atom.html
Ok, In the python console (and in Avogadro 1.1.x) I try:
>>>
>>> import Avogadro
>>>
>>> Avogadro.molecule.atoms[0]
>>>
>>> Avogadro.molecule.atoms[0].setCustomColorName("blue")
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'Atom' object has no attribute 'setCustomColorName'
>>>
>>>
------------
Playing around in ipython ..
--------------
In [15]: import Avogadro
In [16]:
In [16]: mol=Avogadro.MoleculeFile.readMolecule("resumen.xyz")
In [17]:
In [17]: dir(mol.atoms[0])
Out[17]:
['__class__',
'__delattr__',
'__dict__',
'__doc__',
'__format__',
'__getattribute__',
'__hash__',
'__init__',
'__module__',
'__new__',
'__reduce__',
'__reduce_ex__',
'__repr__',
'__setattr__',
'__sizeof__',
'__str__',
'__subclasshook__',
'__weakref__',
'atomicNumber',
'bond',
'bonds',
'forceVector',
'formalCharge',
'id',
'index',
'isHydrogen',
'neighbors',
'partialCharge',
'pos',
'residue',
'residueId',
'type',
'update',
'valence']
----
Regards,
Sampsa
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Avogadro-Discuss mailing list
Avogadro-Discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-discuss