Hi all,

here is an ad-hoc definition of a atom-vector format



function load_vector( url ){
    if( !url ) return false;
    var x = load( url );
    var line1_end = x.find("\n");
    var line1 = x[1][line1_end-1];
    script INLINE @line1;
    if(!colr) colr = "red";
    if(!diameter) diameter = 0.15;
    if(!id) id = "vec";
    var d = x[line1_end][0];
    var i = 0;
    for(l in d.split('\n')){
        var row = l.split(" ");
        var atm = "({" + row[1] + "})";
        var vec = "{" + row[2] + " " + row[3] + " " + row[4] + "}";
        draw ID @{id+i} vector @atm @vec color @colr diameter @diameter;
        ++i;
    }
    return true;
}



# sample file:
# the first line contains jmol script that sets variables used in the 
load_vector function
# the remaining lines have four fields: atomindex, x, y, z

colr = color("roygb", 0, 5, 0); diameter = 0.15; id = "some_vec";
428 -0.08 -0.11 -0.05
438 0.10 -0.10 -0.11
457 0.12 -0.27 -0.13
467 -0.04 -0.32 -0.13
489 -0.08 -0.25 -0.08
598 0.31 0.06 0.03




Best
Alexander

----- Ursprüngliche Mail -----
> Von: "Angel Herráez" <[email protected]>
> An: [email protected]
> Gesendet: Montag, 6. Mai 2013 10:06:50
> Betreff: Re: [Jmol-users]     转发: The vector file format
> 
> Hello, Ying-Li Niu
> 
> There are a couple of commands in Jmol that can draw arrows. it is
> not a file format, though. You provide the data in a command.
> 
> See "draw arrow" and "vector" in
> http://chemapps.stolaf.edu/jmol/docs/
> 
> If you have those data in a file, maybe you can make use of the
> "data" command to load them somewhow.
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for
> Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to