<commit_before>

NGL.Examples = {

    load: function( name, stage ){

        NGL.Examples.data[ name ]( stage );

    },

    add: function( examples ){

        Object.keys( examples ).forEach( function( name ){

            NGL.Examples.data[ name ] = examples[ name ];

        } );

    },

    data: {

        "trajectory": function( stage ){

            var params = {
                sele: "protein or na or cl",
                // sele: "349-352",
            };

            stage.loadFile( "data://md.gro", function( o ){

                o.addRepresentation( "line", { sele: "not hydrogen and sidechainAttached" } );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                // o.addRepresentation( "spacefill", { sele: "NA or CL" } );
                o.centerView();

                o.addTrajectory( "__example__/md.xtc" );

            }, params );

            stage.loadFile( "data://md.gro", function( o ){

                o.addRepresentation( "backbone", { sele: "protein", color: "ss" } );

            } );

        },

        "trr_trajectory": function( stage ){

            stage.loadFile( "data://md.gro", function( o ){

                o.addRepresentation( "line" );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                o.centerView();

                o.addTrajectory( "__example__/md.trr" );

            } );

        },

        "dcd_trajectory": function( stage ){

            stage.loadFile( "data://ala3.pdb", function( o ){

                o.addRepresentation( "licorice" );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                o.centerView();

                o.addTrajectory( "__example__/ala3.dcd" )
                    .setParameters( {
                        "centerPbc": false,
                        "removePbc": false,
                        "superpose": true
                    } );

            } );

        },

        "netcdf_trajectory": function( stage ){

            stage.loadFile( "data://DPDP.pdb", function( o ){

                o.addRepresentation( "licorice" );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                o.centerView();

                o.addTrajectory( "__example__/DPDP.nc" )
                    .setParameters( {
                        "centerPbc": false,
                        "removePbc": false,
                        "superpose": true
                    } );

            } );

        },

        "anim_trajectory": function( stage ){

            stage.loadFile( "data://md.gro", function( o ){

                o.addRepresentation( "line", { sele: "not hydrogen and protein" } );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                o.centerView();

                var trajComp = o.addTrajectory( "__example__/md.xtc" );

                trajComp.trajectory.signals.gotNumframes.add( function(){

                    var player = new NGL.TrajectoryPlayer(
                        trajComp.trajectory, 1, 100
                    );
                    player.mode = "once";
                    player.play();

                } );

            } );

        },

        "gro_trajectory": function( stage ){

            stage.loadFile( "data://md_1u19_trj.gro", function( o ){

                o.addTrajectory();

                o.addRepresentation( "cartoon" );
                o.addRepresentation( "line", {
                    sele: "not hydrogen and sidechainAttached"
                } );
                o.centerView();

            }, null, null, { asTrajectory: true } );

        },

        "3pqr": function( stage ){

            stage.loadFile( "data://3pqr.pdb", function( o ){

                o.addRepresentation( "cartoon", { sele: "1-320", wireframe: false } );
                o.addRepresentation( "tube", { sele: "*", scale: 0.4 } );
                o.addRepresentation( "rope", { sele: "*", subdiv: 2 } );
                o.addRepresentation( "licorice", { sele: ".C or .CA or .O" } );

                // o.addRepresentation( "tube", {
                //     sele: "*", color: "atomindex", radius: "bfactor", scale: 0.01,
                //     subdiv: 50, radialSegments: 50, visible: true
                // } );
                // o.addRepresentation( "ball+stick", { sele: "135:A or 347:B or 223:A" } );
                // o.addRepresentation( "licorice", { sele: "hetero" } );
                // o.addRepresentation( "rope", { smooth: 2 } );

                o.centerView( "320" );

            } );

        },

        "1blu": function( stage ){
<commit_msg>FIX: nicer 3pqr example<commit_after>

NGL.Examples = {

    load: function( name, stage ){

        NGL.Examples.data[ name ]( stage );

    },

    add: function( examples ){

        Object.keys( examples ).forEach( function( name ){

            NGL.Examples.data[ name ] = examples[ name ];

        } );

    },

    data: {

        "trajectory": function( stage ){

            var params = {
                sele: "protein or na or cl",
                // sele: "349-352",
            };

            stage.loadFile( "data://md.gro", function( o ){

                o.addRepresentation( "line", { sele: "not hydrogen and sidechainAttached" } );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                // o.addRepresentation( "spacefill", { sele: "NA or CL" } );
                o.centerView();

                o.addTrajectory( "__example__/md.xtc" );

            }, params );

            stage.loadFile( "data://md.gro", function( o ){

                o.addRepresentation( "backbone", { sele: "protein", color: "ss" } );

            } );

        },

        "trr_trajectory": function( stage ){

            stage.loadFile( "data://md.gro", function( o ){

                o.addRepresentation( "line" );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                o.centerView();

                o.addTrajectory( "__example__/md.trr" );

            } );

        },

        "dcd_trajectory": function( stage ){

            stage.loadFile( "data://ala3.pdb", function( o ){

                o.addRepresentation( "licorice" );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                o.centerView();

                o.addTrajectory( "__example__/ala3.dcd" )
                    .setParameters( {
                        "centerPbc": false,
                        "removePbc": false,
                        "superpose": true
                    } );

            } );

        },

        "netcdf_trajectory": function( stage ){

            stage.loadFile( "data://DPDP.pdb", function( o ){

                o.addRepresentation( "licorice" );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                o.centerView();

                o.addTrajectory( "__example__/DPDP.nc" )
                    .setParameters( {
                        "centerPbc": false,
                        "removePbc": false,
                        "superpose": true
                    } );

            } );

        },

        "anim_trajectory": function( stage ){

            stage.loadFile( "data://md.gro", function( o ){

                o.addRepresentation( "line", { sele: "not hydrogen and protein" } );
                o.addRepresentation( "cartoon", { sele: "protein" } );
                o.centerView();

                var trajComp = o.addTrajectory( "__example__/md.xtc" );

                trajComp.trajectory.signals.gotNumframes.add( function(){

                    var player = new NGL.TrajectoryPlayer(
                        trajComp.trajectory, 1, 100
                    );
                    player.mode = "once";
                    player.play();

                } );

            } );

        },

        "gro_trajectory": function( stage ){

            stage.loadFile( "data://md_1u19_trj.gro", function( o ){

                o.addTrajectory();

                o.addRepresentation( "cartoon" );
                o.addRepresentation( "line", {
                    sele: "not hydrogen and sidechainAttached"
                } );
                o.centerView();

            }, null, null, { asTrajectory: true } );

        },

        "3pqr": function( stage ){

            stage.loadFile( "data://3pqr.pdb", function( o ){

                o.addRepresentation( "cartoon", {
                    color: "residueindex", aspectRatio: 4, scale: 0.5
                } );
                o.addRepresentation( "rope", {
                    color: "residueindex", visible: false
                } );
                o.addRepresentation( "ball+stick", {
                    sele: "296 or RET", scale: 3, aspectRatio: 1.5
                } );
                o.addRepresentation( "surface", {
                    sele: "RET", transparent: true, opacity: 0.4
                } );
                o.addRepresentation( "licorice", {
                    sele: "( ( 135 or 223 ) and sidechainAttached ) or ( 347 )",
                    scale: 3, aspectRatio: 1.5
                } );
                o.addRepresentation( "contact", {
                    sele: "135 or 223 or 347",
                    scale: 0.7
                } );
                o.addRepresentation( "label", {
                    sele: "( 135 or 223 or 347 or 296 ) and .CB",
                    scale: 1.7
                } );
                o.addRepresentation( "label", {
                    sele: "RET and .C19",
                    scale: 1.7, labelType: "resname"
                } );

                o.centerView();

            } );

        },

        "1blu": function( stage ){

{'fraction_non_alphanumeric': 0.13913400369382312, 'fraction_numerical': 0.011902318900061564, 'mean_word_length': 1.2340132936053174, 'pattern_counts': {'":': 28, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2437443', 'n_tokens_mistral': 2980, 'n_tokens_neox': 2650, 'n_words': 539}