Rappsilber-Laboratory / build-xiview

GNU General Public License v3.0
2 stars 0 forks source link

3d view pymol command file with cif files #110

Closed grandrea closed 3 months ago

grandrea commented 3 months ago

Hello, pymol command file export does not work with .cif files. The generated command file replaces the file ending, which is assumed to be ".pdb", in the list of commands. so the commands generated do not work with .cif files, where ".cif" should be replaced.

colin-combe commented 3 months ago

ok, thanks

colin-combe commented 3 months ago

will fix

colin-combe commented 3 months ago

this is only a problem when it's a locally uploaded file, right?

colin-combe commented 3 months ago

@grandrea - I'm not getting this behaviour. It works (no spurious reference to .pdb files in pymol export) when entering a PBD code to load automatically, and if I upload a local .cif file I get pymol export like:

# Exported by NGL Viewer - PDB Structure and XiView
# Search ID: SRCH=2
# Filter: MAN.MONOLINKS.XLINKS.BTWN.SELF.HOMOM.NOTHOMOMULT.AMBIG.PEPLEN=1.PASS.DECOYS.TARGETS.DISTUNK.MGRP.URPPPI=1.MATCHSCORES=0-37.GROUPS='NA'.PRIMARYSCORE=[object Obje
load 1cqi.cif
distance [LYS]146:B:0-[LYS]255:A:0, resi 146 and name CA and chain B and 1cqi.cif, resi 255 and name CA and chain A and 1cqi.cif
distance [MET]1:B:0-[LYS]240:A:0, resi 1 and name CA and chain B and 1cqi.cif, resi 240 and name CA and chain A and 1cqi.cif
distance [LYS]240:A:0-[LYS]271:A:0, resi 240 and name CA and chain A and 1cqi.cif, resi 271 and name CA and chain A and 1cqi.cif

which seem right?

I'll need more info on how to replicate? What data / what structure file?

You can post or email a link to the dataset, though I may end up asking for a copy of the data you uploaded coz it makes it easier to replicate/debug on my local machine .

grandrea commented 3 months ago

exactly, the session should say

load 1cqi.cif
distance [LYS]146:B:0-[LYS]255:A:0, resi 146 and name CA and chain B and 1cqi, resi 255 and name CA and chain A and 1cqi

as pymol removes the endings once a structure is loaded. If you load a pdb, you see we have done it so that the command removes the endings for pdb files

colin-combe commented 3 months ago

i see, i misinterpreted the problem. Should be fixed now? (v.1.0.7, deployed at xiview.org)

colin-combe commented 3 months ago

why is this only needed for local files? ( https://github.com/Rappsilber-Laboratory/xiview/commit/9da66a4f8f894ec087788f2829b852c388fd2e26 ) shoudn't it do the same if data is fetched after entering pdb code?

grandrea commented 3 months ago

yes, fixed! That is because if you load a local pdb file you use the command "load xxx.cif/pdb" . when you download from pdb you use "fetch 1bxy" and the string already misses the extension.