[Chimera-users] volume data to numpy array
Tom Goddard
goddard at sonic.net
Thu Jun 30 13:32:13 PDT 2022
Hi Hernando,
Here is Python code showing how to read volume data into a numpy array
https://www.rbvi.ucsf.edu/trac/chimera/attachment/wiki/Scripts/readvol.py <https://www.rbvi.ucsf.edu/trac/chimera/attachment/wiki/Scripts/readvol.py>
This comes from the Chimera Python scripts page that show how to do many other Chimera things in Python
https://www.rbvi.ucsf.edu/trac/chimera/wiki/Scripts
ChimeraX is much more capable than Chimera for many tasks and its Python functions are better documented so you may want to think about using ChimeraX.
Tom
> On Jun 30, 2022, at 12:47 PM, Hernando J Sosa via Chimera-users <chimera-users at cgl.ucsf.edu> wrote:
>
> Dear Chimera,
>
> How do you read/copy volume data into a numpy array. I think I saw some code examples that do this in the past but I can't find the ink to them.
>
> Thanks
>
> Hernando
> From: Chimera-users <chimera-users-bounces at cgl.ucsf.edu <mailto:chimera-users-bounces at cgl.ucsf.edu>> on behalf of Elaine Meng via Chimera-users <chimera-users at cgl.ucsf.edu <mailto:chimera-users at cgl.ucsf.edu>>
> Sent: Monday, June 27, 2022 11:37 AM
> To: Utkarsh Narsaria <aunarsaria0970 at gmail.com <mailto:aunarsaria0970 at gmail.com>>
> Cc: Chimera <chimera-users at cgl.ucsf.edu <mailto:chimera-users at cgl.ucsf.edu>>
> Subject: Re: [Chimera-users] AutoDock Vina error on Chimera
>
> CAUTION: This email comes from an external source; the attachments and/or links may compromise our secure environment. Do not open or click on suspicious emails. Please click on the “Phish Alert” button on the top right of the Outlook dashboard to report any suspicious emails.
>
> Hello Utkarsh,
> You would need to change the names of any hydrogens that start with HN to something else, e.g. HN41 -> H41
> Regards,
> Elaine
> -----
> Elaine C. Meng, Ph.D.
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
>
>
>
>
> > On Jun 27, 2022, at 7:32 AM, Utkarsh Narsaria via Chimera-users <chimera-users at cgl.ucsf.edu <mailto:chimera-users at cgl.ucsf.edu>> wrote:
> >
> > Dear Dr. Meng,
> >
> > Thank you for your reply. I was able to resolve the Hc-Hc atom type error with your suggestions. But for the Hn atom type, the error is persistent. I cannot delete these atoms as they are important for docking. Hence, I am attaching the ligand file in the MOL2 format and snip of the ligand with Hn atom type with this mail for your reference. I would like to know your valuable input in resolving the error.
> >
> > Regards,
> > Utkarsh
> >
> >
> > On Fri, Jun 24, 2022 at 9:34 PM Elaine Meng <elaine.meng at ucsf.edu <mailto:elaine.meng at ucsf.edu>> wrote:
> > Hello Utkarsh,
> > Autodock Vina only works with the usual common elements. Those messages from Autodock Vina are saying that it does not recognize atom types Ho (holmium??) and Hc (which is not even an element symbol). Without your providing an example input that shows the problem, my only guess is that you have hydrogens with 4-character atom names that start with HO and HC which makes Autodock scripts guess that they are different elements (instead of hydrogen). I don't know if Chimera added those hydrogens or if they were already in your ligand files when you opened them.
> >
> > Autodock Vina is developed by another group and and so we are not experts in that program. However, my understanding is that it doesn't use atomic charges and doesn't use hydrogens on carbons. So you may not need to use Dock Prep at all, because the Autodock Vina tool already has an option to add hydrogens in Chimera (see the "Receptor options" in the tool).
> > <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimera%2Fdocs%2FContributedSoftware%2Fvina%2Fvina.html&data=05%7C01%7Chernando.sosa%40einsteinmed.edu%7C5f0953fdd14d49964df408da58530125%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C637919410778007425%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OU8P4h9jWnoFUUBlmVy4p2ocWQuHjbLV98RxMHtDDPg%3D&reserved=0 <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fchimera%2Fdocs%2FContributedSoftware%2Fvina%2Fvina.html&data=05%7C01%7Chernando.sosa%40einsteinmed.edu%7C5f0953fdd14d49964df408da58530125%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C637919410778007425%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OU8P4h9jWnoFUUBlmVy4p2ocWQuHjbLV98RxMHtDDPg%3D&reserved=0>>
> >
> > However, you could turn off that option in the Autodock Vina tool if you wanted just to run addh separately beforehand. That would also allow you to delete the nonpolar ( = those on carbon) hydrogens before using Autodock Vina, e.g. command
> >
> > delete HC
> >
> > ...which should get rid of the "Hc" type messages. You don't want to delete the hydrogens on oxygen even though it would prevent "Ho" messages, since they are needed for atom type identification. Instead you would have to either manually edit your ligand atom names to avoid 4-character hydrogen names starting with HO (if my theory that 4-character atom names are the problem is correct).
> >
> > Please note that the Autodock Vina tool in Chimera is of limited use, as mentioned in the gray box at the top of the help page:
> >
> > "this tool only allows docking a single ligand with very limited sampling. For a more intensive sampling of space, as needed for most research applications, or access to other options such as ligand database search, we recommend running the locally installed copy of AutoDock Vina directly (not using Chimera)."
> >
> > I hope this helps,
> > Elaine
> >
> > > On Jun 24, 2022, at 3:28 AM, Utkarsh Narsaria via Chimera-users <chimera-users at cgl.ucsf.edu <mailto:chimera-users at cgl.ucsf.edu>> wrote:
> > >
> > > Dear Team,
> > > I am using chimera for a typical protein-ligand docking study. The ligands were prepared in chimera itself using the dockprep options using gasteiger charges and amber ff14SB force field. While docking the same using AutoDock Vina function in Chimera , we encountered few errors for some of the ligands. The errors are explained as follows :
> > > 1. "" Ho" is not a valid dock type AutoDock atom types are case-sensitive."
> > > 2. Autodock Vina Error on Chimera: "ValueError: Could not find an atomic number for Hc Hc"
> > > Any inputs regarding these will be helpful in resolving the issues.
> > > Regards,
> > > Utkarsh
> >
> > <ZINC000003874467-minim.mol2><ZINC3874467-snip.PNG>_______________________________________________
> > Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
> > Manage subscription: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fmailman%2Flistinfo%2Fchimera-users&data=05%7C01%7Chernando.sosa%40einsteinmed.edu%7C5f0953fdd14d49964df408da58530125%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C637919410778007425%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TFal8hIEyjVQjNWHZ9JKXIBrP87uVHoJskpBUqkz2D4%3D&reserved=0 <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fmailman%2Flistinfo%2Fchimera-users&data=05%7C01%7Chernando.sosa%40einsteinmed.edu%7C5f0953fdd14d49964df408da58530125%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C637919410778007425%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TFal8hIEyjVQjNWHZ9JKXIBrP87uVHoJskpBUqkz2D4%3D&reserved=0>
>
>
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
> Manage subscription: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fmailman%2Flistinfo%2Fchimera-users&data=05%7C01%7Chernando.sosa%40einsteinmed.edu%7C5f0953fdd14d49964df408da58530125%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C637919410778007425%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TFal8hIEyjVQjNWHZ9JKXIBrP87uVHoJskpBUqkz2D4%3D&reserved=0 <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fmailman%2Flistinfo%2Fchimera-users&data=05%7C01%7Chernando.sosa%40einsteinmed.edu%7C5f0953fdd14d49964df408da58530125%7C9c01f0fd65e040c089a82dfd51e62025%7C0%7C0%7C637919410778007425%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TFal8hIEyjVQjNWHZ9JKXIBrP87uVHoJskpBUqkz2D4%3D&reserved=0>
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimera-users/attachments/20220630/7f284095/attachment.html>
More information about the Chimera-users
mailing list