On Mon, Aug 9, 2010 at 8:39 PM, Geoffrey Hutchison
geoff.hutchison@gmail.com wrote:
My Avogadro is 1.0.0, and babel is 2.2.3. The charges calculated by mopac and displayed by Gabedit are diferents than when I open the mopac output file in Avogadro. Indeed, the charges displayed in Avogadro are the same as if I draw the mocule in avogadro, without any QM proceeding.
I can now reproduce this and will have a fix for the current development version of Open Babel. This will shortly be released as OB-2.3, but if you’re willing to compile from source code, I can send you a snapshot.
[Snip … need for more python examples and documentation]
So, I have a suggestion, would be great to work with proteins in avogadro, if like in pymol, select resides by reside name, in a list (sorry if this option is already avalible in Avogadro).
I think Tim would be the one to comment here. I know it’s possible to select residues by name in the user interface, but I do not know if this is possible in python.
You could write tools to make it easier to work with proteins in
python. There is an example on the wiki with some protein related
function.
http://avogadro.openmolecules.net/wiki/Protein.py
This gives the following menu items: “Select Backbone”, “Select Side
Chains”, “Select Binding Site” and “Cut Surface”
The performance isn’t great though and I wanted to do much more
complex things so C++ seems the obvious choice.
I have some initial code for this actually. It is a very simple
scripting language (OBScript) and I mainly use it for working with
proteins. There are variables (no OO objects) and predefined
functions. Some examples
protein = read(“protein.pdb”)
backbone = select_backbone(protein)
residues = select_residues(protein, “10,13-15, D17-TYR24, ALA34-56”)
correct_protein(protein) # in progress, fixes missing atoms/bonds and so on
ff = get_forcefield(“UFF”)
fix_atoms(ff, backbone)
steepest_descent(ff, protein)
write(“protein_optimized_sidechains.pdb”)
It will not become a full scripting language but it is ideal for a
terminal. You can also add additional functions using a plugin
mechanism. For example, Avogadro could have a plugin with functions
that work directly on the molecule:
protein = read(“protein.pdb”)
avo_add_molecule(protein) # adds the molecule to the avogadro display
avo_select(protein) # makes a selection in avogadro
avo_deselect(protein)
avo_deselect() # deselect all
backbone = select_backone(protein) # obscript selection
avo_select(backbone) # use the obscript selection to select the
atoms/bonds in avogadro
avo_select_backone()
avo_select_residues(“11-23”)
…
I could also provide some overload method if this sounds to complicated.
All code is in a single file so it would be easy to embed this with
the avogadro code. It’s not complete since I mainly add functions as I
need them. However, I think something like this would make working
with proteins much easier.
Any suggestions on this? Any help would be welcome including making up
a list of functions there should be.
Best regards,
-Geoff