[chimera-dev] python script for ligand preparation

Elaine Meng meng at cgl.ucsf.edu
Thu Jul 7 08:14:24 PDT 2022


Hello Gayatri Navle,
You did not say what the problem is.

However, I can see that the file named L222.mol2 that you attached is not a mol2 file.  It is a PDB file. I can tell by looking at it in a text editor. As explained in the "write" help, you need to include "format mol2" if you want mol2.  

<https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/write.html>

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

> On Jul 7, 2022, at 12:10 AM, ngayatri via Chimera-dev <chimera-dev at cgl.ucsf.edu> wrote:
> 
> Hello Elaine Meng,
> I have attached a picture of commands that i have been using for ligand preparation and also i have attached the output of .mol2 output file for your reference. Please have a look and let me know about the mistake that i have been making in the commands that i have been using.
>  
> Thank You
> Regards
> Gayatri Navle
>  
> On June 22, 2022 at 9:08 PM Elaine Meng <meng at cgl.ucsf.edu> wrote: 
> > Dear Gayatri, 
> > It is not possible to know what happened unless you provide more information. Did saving the mol2 file work correctly when you entered the "write" command directly into the Command Line (when testing before making the script)? If not, then you probably typed the wrong command. Exactly what command did you use? Were there any error messages? Was the .mol2 file empty? etc. 
> > 
> > You could also attach the script if you don't mind making it public. However, I don't know python so somebody else would have to look at it. I can only advise on the Chimera commands. 
> > 
> > I hope this helps, 
> > Elaine 
> > 
> > > On Jun 22, 2022, at 2:56 AM, ngayatri via Chimera-dev <chimera-dev at cgl.ucsf.edu> wrote: 
> > > 
> > > Dear Elaine, 
> > > I followed the steps to save a ligand in .mol2 file but the mol2 format file after saving is not opening in the chimera even after adding the charges. 
> > > Please help me with what steps should i follow. 
> > > 
> > > Thank You 
> > > Regards 
> > > Gayatri 
> > > 
> > > On June 21, 2022 at 1:47 AM Elaine Meng <meng at cgl.ucsf.edu> wrote: 
> > > > Hi Gayatri, 
> > > > There is a Dock Prep tool that does all this. Menu: Tools... Structure Editing... Dock Prep 
> > > > <https://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/dockprep/dockprep.html> 
> > > > 
> > > > If you mean that you have too many files to do individually with the graphical interface, however, you may need to figure out how do it with Chimera commands instead. See commands "open" to open the ligand file, "addh" to add hydrogens, "addcharge" to assign partial charges (and maybe other commands depending on what you mean by prepare) and"write" to save Mol2. 
> > > > <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/open.html> 
> > > > <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/addh.html> 
> > > > <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/addcharge.html> 
> > > > <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/write.html> 
> > > > 
> > > > You should first try entering those individual commands in the Command Line one by one to figure out exactly what options you want for each ligand. After you know what commands and options you want to use for each ligand, then you can put a python script around it to loop through multiple files as described here 
> > > > <https://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html> 
> > > > 
> > > > I hope this helps, 
> > > > Elaine 
> > > > ----- 
> > > > Elaine C. Meng, Ph.D. 
> > > > UCSF Chimera(X) team 
> > > > Department of Pharmaceutical Chemistry 
> > > > University of California, San Francisco 
> > > > 
> > > > > On Jun 20, 2022, at 4:37 AM, ngayatri via Chimera-dev <chimera-dev at cgl.ucsf.edu> wrote: 
> > > > > 
> > > > > Dear Chimera Team, 
> > > > > I am trying to prepare separate ligand file and saving it in the .mol2 file. So if you could help with script or the approach would be grateful. 
> > > > > Thank You 
> > > > > Regards 
> > > > > Gayatri 
> > 
> 
> <issue_mol2.png><L222.mol2>




More information about the Chimera-dev mailing list