[chimera-dev] python script for ligand preparation

Elaine Meng meng at cgl.ucsf.edu
Wed Jun 22 08:38:57 PDT 2022


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 



More information about the Chimera-dev mailing list