[chimera-dev] writing atom information using the mol2 atom order.
Jean Didier Pie Marechal
JeanDidier.Marechal at uab.cat
Tue Nov 3 06:16:17 PST 2009
Dear all,
I have a mol2 file and I would like to generate an input for an external program using chimera. For a great ease in practicability, I would like the mol2 order to be kept.
I used the following artefact to get to what I want:
def input(molecule):
##for compatibility with mol2 atom ordering I use the doble loop as follow
##makes the writing substantially slower, but yet the compatibility with mol2 format seems absolute.
for i in range(len(molecule.atoms)):
for atoms in molecule.atoms:
if atoms.serialNumber == i:
text=str(atoms.element)+"-"+str(atoms.gaffType)+"-"+str(atoms.charge)+" "+str(atoms.flex)+" "+str(atoms.coord()) +"\n"
filename.write(text)
i=i+1
I think I could order directly the writing in function of the serialNumber (which is preserved regarding the mol2) file. But how could I do this?
Best,
JD
Dr. Jean-Didier Maréchal
Lecturer
Computational Biotechnological Chemistry @ Transmet
Unitat de Química Física
Departament de Química
Universitat Autònoma de Barcelona
Edifici C.n.
08193 Cerdanyola (Barcelona)
Tel: +34.935814936
e-mail: JeanDidier.Marechal at uab.es
----- Missatge original -----
De: chimera-dev-request at cgl.ucsf.edu
Data: Dilluns, Octubre 26, 2009 8:00 pm
Assumpte: Chimera-dev Digest, Vol 69, Issue 1
> Send Chimera-dev mailing list submissions to
> chimera-dev at cgl.ucsf.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev
> or, via email, send a message with subject or body 'help' to
> chimera-dev-request at cgl.ucsf.edu
>
> You can reach the person managing the list at
> chimera-dev-owner at cgl.ucsf.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Chimera-dev digest..."
>
>
> Today's Topics:
>
> 1. thank you so much (Corey Fugate)
> 2. Re: thank you so much (Eric Pettersen)
>
>
> --------------------------------------------------------------------
> --
>
> Message: 1
> Date: Fri, 23 Oct 2009 16:57:11 -1000
> From: Corey Fugate <fugate at hawaii.edu>
> To: chimera-dev at cgl.ucsf.edu
> Subject: [chimera-dev] thank you so much
> Message-ID: <D445EAAC-78D8-4394-85E0-997DBED43CD8 at hawaii.edu>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> I started using Chimera a few weeks ago. It is wonderful, I love it.
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 26 Oct 2009 11:03:55 -0700
> From: Eric Pettersen <pett at cgl.ucsf.edu>
> To: Corey Fugate <fugate at hawaii.edu>
> Cc: chimera-dev at cgl.ucsf.edu
> Subject: Re: [chimera-dev] thank you so much
> Message-ID: <26F83250-86D7-4E19-8B17-304418C8169D at cgl.ucsf.edu>
> Content-Type: text/plain; charset="us-ascii"; Format="flowed";
> DelSp="yes"
>
> So glad you like it. And always struggling to make it better.
> Thanks! :-)
>
> --Eric
>
>
> Eric Pettersen
> UCSF Computer Graphics Lab
> http://www.cgl.ucsf.edu
>
>
> On Oct 23, 2009, at 7:57 PM, Corey Fugate wrote:
>
> > I started using Chimera a few weeks ago. It is wonderful, I
> love it.
> > _______________________________________________
> > Chimera-dev mailing list
> > Chimera-dev at cgl.ucsf.edu
> > http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.cgl.ucsf.edu/pipermail/chimera-
> dev/attachments/20091026/6fa67784/attachment-0001.html>
>
> ------------------------------
>
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev
>
>
> End of Chimera-dev Digest, Vol 69, Issue 1
> ******************************************
>
More information about the Chimera-dev
mailing list