pv icon indicating copy to clipboard operation
pv copied to clipboard

Display problem of structure of alphafold2

Open lh12565 opened this issue 2 years ago • 6 comments

Hi, @biasmv When I visualize my structure of alphafold2 as cartoon, it shows like a tube as follows: ALPHA I don't know how to solve it. Thanks!

lh12565 avatar Sep 01 '22 14:09 lh12565

You may have to call mol.assignHelixSheet on the structure, as soon as you load it. It might also be that that structure has no secondary structure? What is the UniProt AC?

awaterho avatar Sep 01 '22 15:09 awaterho

You may have to call mol.assignHelixSheet on the structure, as soon as you load it. It might also be that that structure has no secondary structure? What is the UniProt AC?

Hi, @awaterho my uniprot AC is P48980. It seems have secondary structure in alphafold database: https://alphafold.ebi.ac.uk/entry/P48980

lh12565 avatar Sep 01 '22 15:09 lh12565

Hello, P48980 looks to be a much larger structure than appears in your image? Do you call assignHelixSheet after you load the structure?

On Thu, 1 Sept 2022 at 17:23, lh12565 @.***> wrote:

You may have to call mol.assignHelixSheet on the structure, as soon as you load it. It might also be that that structure has no secondary structure? What is the UniProt AC?

Hi, @awaterho https://github.com/awaterho my uniprot AC is P48980. It seems have secondary structure in alphafold database: https://alphafold.ebi.ac.uk/entry/P48980

— Reply to this email directly, view it on GitHub https://github.com/biasmv/pv/issues/192#issuecomment-1234433992, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCKMCHHJCRFJDTVRSTB4TLV4DDALANCNFSM6AAAAAAQCNRGLU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mizuchi3 avatar Sep 01 '22 15:09 mizuchi3

Hello, P48980 looks to be a much larger structure than appears in your image? Do you call assignHelixSheet after you load the structure? On Thu, 1 Sept 2022 at 17:23, lh12565 @.> wrote: You may have to call mol.assignHelixSheet on the structure, as soon as you load it. It might also be that that structure has no secondary structure? What is the UniProt AC? Hi, @awaterho https://github.com/awaterho my uniprot AC is P48980. It seems have secondary structure in alphafold database: https://alphafold.ebi.ac.uk/entry/P48980 — Reply to this email directly, view it on GitHub <#192 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCKMCHHJCRFJDTVRSTB4TLV4DDALANCNFSM6AAAAAAQCNRGLU . You are receiving this because you are subscribed to this thread.Message ID: @.>

Hi @mizuchi3 How to call assignHelixSheet after load the structure? My code is as below:

var parent = document.getElementById('viewer');jQuery.cookie('default','cartoon',{ expires: 365, path: '/' });
    var viewer = pv.Viewer(parent,
        { width : $('.viewerad').width(), height : $('.viewerad').height(), antialias : true,outline:false});
    function getpvalphaViewer(pvpdb) {
//        if(1){
//               viewer.rm('structure'+pvpdb);
//        }
//         jQuery.cookie('default',litext,{ expires: 365, path: '/' });

        pv.io.fetchPdb('../pl/alpha/' + pvpdb+'.pdb', function (structure) {
            // put this in the viewerReady block to make sure we don't try to add the
            // object before the viewer is ready. In case the viewer is completely
            // loaded, the function will be immediately executed.
//            if (selectpdb[pvpdb]) {
//                return;
//            }
            selectpdb[pvpdb] = true;
            if (structure && selectpdb[pvpdb]) {
                viewer.on('viewerReady', function () {
                    switch ($.cookie('default')) {
                        case "trace":viewer.trace('structure' + pvpdb, structure);break
                        case "lines":viewer.lines('structure' + pvpdb, structure);break;
                        case "tube":viewer.tube('structure' + pvpdb, structure);break;
                        case "ballsAndSticks":viewer.ballsAndSticks('structure' + pvpdb, structure);break;
                        default:viewer.cartoon('structure' + pvpdb, structure);
                    }
                });

                //changeRep( $.cookie('default') );
                //var go = viewer.renderAs('structure', structure, 'ballsAndSticks');
                // adjust center of view and zoom such that all structures can be seen.
                viewer.autoZoom();
            }
            viewer.fitParent();
        });
    }

Thanks!

lh12565 avatar Sep 02 '22 02:09 lh12565

pv.io.fetchPdb('alphafold.pdb', function (structure) { mol.assignHelixSheet(structure); viewer.cartoon('structure', structure); viewer.autoZoom(); viewer.fitParent(); });

awaterho avatar Sep 02 '22 07:09 awaterho

pv.io.fetchPdb('alphafold.pdb', function (structure) { mol.assignHelixSheet(structure); viewer.cartoon('structure', structure); viewer.autoZoom(); viewer.fitParent(); });

Thanks! It works.

lh12565 avatar Sep 02 '22 11:09 lh12565