Hi Tristan, David,

  I've made the ChimeraX 1.9 release candidates and ChimeraX daily builds read Chai-1 .npy PAE files directly.  This will be in tomorrows ChimeraX builds (dated Nov 27 or newer). These PAE files read in much faster (less than a second) for large structures since they are a binary file format.

Tom


On Nov 26, 2024, at 1:49 AM, Tristan Croll <tcroll@altoslabs.com> wrote:

Hi Tom,

It's issue #16221. :)

David: this little Python method will read all Chai-1 .npy files in a directory and write their contents into .json format readable by the current ChimeraX AlphaFold plugin. Note that it's pretty quick-and-dirty and will simply attempt to work on every .npy file in the directory, so use with that in mind. 

Regarding Boltz-1: while I'm liking its promise, the current implementation doesn't write any confidence metrics at all. Apparently they're planning to add that in a (hopefully near-) future update.

def pae_to_json():
    import numpy,json,glob
    for file in glob.glob('*.npy'):
        with open(file, 'rb') as infile:
            pae = numpy.load(infile)
            with open(file.replace('npy','json'), 'wt') as outfile:
                json.dump({'pae':pae.tolist()}, outfile)
Best,
Tristan

On Tue, Nov 26, 2024 at 2:45 AM Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi David,

  Yes, I was talking to Tristan Croll last month about the Chai-1 AlphaFold 3 clone putting the PAE data in .npy files while AlphaFold 3 puts them in JSON files.  Tristan offered some Python code that converted the .npy to the standard AlphaFold 3 JSON that could be opened in ChimeraX, but I seem to have lost that email.  At any rate I think ChimeraX should be made to read the .npy since it is binary and it will load much faster than the JSON files for large structures.  Also locally run AlphaFold 3 names the PAE json file in a a way different from AlphaFold 2 so ChimeraX does not automatically find it.  I hope to fix that too.

  I had not heard of Boltz-1 and don't know what PAE format they might use.  Making up your own format has the drawback that it probably won't work with other software.

Tom


On Nov 25, 2024, at 2:41 PM, David S. Fay via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi,

Apologies if this already came up and I missed it. I just ran a few dimer models on the Chai Discovery website (https://lab.chaidiscovery.com/dashboard) and it seems to work quite well. 

However, when I tried to upload the relevant json file using the Structure Prediction - AlphaFold Error Plot pulldown menu, ChimeraX failed to recognize the file. I tried a few other files and something similar happened. Do you know of a workaround or is this something that is likely to get patched soon? I should mention that Chai may be putting the relevant PAE information into a “npy" file, (e.g., pae.model_idx_0.rank_1.npy) based on the size of that file, and I haven’t yet tried to convert npy to a json or know if that’s even possible. 

I also wonder if Boltz-1, another AF3 competitor, will have different outputs as well. They don’t seem to have a GUI yet and perhaps they won’t, so I haven’t been able tyo test this yet. I assume this has all been topic of discussions at ChimeraX though…

Thanks in advance for your help!

David

David S. Fay Ph.D.
Professor, Department of Molecular Biology
Associate Director, National Institutes of Health Wyoming INBRE
University of Wyoming
email: davidfay@uwyo.edu

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Altos Labs UK Limited | England | Company reg 13484917  
Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, United Kingdom, WA14 2DT