[visit-users] Creating length dependent coloured bonds in VisIt

Willie Maddox wmaddox at mymail.mines.edu
Tue Mar 30 21:26:25 EDT 2010


Awesome! That did it!

On Tue, Mar 30, 2010 at 6:12 PM, Brad Whitlock <whitlock2 at llnl.gov> wrote:

>  You could probably use the CreateBonds operator to create the bonds
> between atoms. From there, you might have to use the DeferExpression
> operator (you may need to enable it in the Plugin manager window first) in
> order to ensure that your expression calculations are not done until after
> the CreateBonds operator has had a chance to create the bonds.
>
> Brad
>
>
> Well, I'm starting from a file which contains the x, y, and z coordinates
> of each atom. So, the mesh is a representation of the points not the
> distances between the points. Do I need calculate the bond lengths before I
> can use the "max_edge_length(mesh)" expression? If so, how can this be
> accomplished?
>
> -WM
>
> On Tue, Mar 30, 2010 at 2:03 PM, Meredith, Jeremy S. <jsmeredith at ornl.gov>
> wrote:
>
> Sure, no problem. You're on the right track with expressions: the one you
> want is called "max_edge_length", which reports the maximum length of any
> edge of a mesh element. Since bonds are 1d mesh elements with a single edge,
> this just calculates their length.
>
> So: just create a new expression called "bondlength", of type "Scalar Mesh
> Variable", and define it as "max_edge_length(mesh)".
>
> Then plot that "bondlength" variable, presumably with the Molecule plot or
> the Pseudocolor plot. The pseudocolor plot will show you the "0" value for
> your atoms, but I believe the Molecule plot is smart enough to know this
> only applies to bonds. You could make a second Molecule plot showing only
> the atoms if you wanted to color them by species, for example -- the setting
> to hide the bonds is in the Molecule plot window.
>
> Either of those plots has support for picking a color map. You might pick
> the "difference" color table, which shows lower values in red and large
> values in blue, and you can clamp the lower and upper values for the map. Or
> define your own color table, of course.
>
> If you have a known bond length you want to compare against, you might plot
> a new expression like "2.0 - bondlength", and clamp the values in the plot
> to the same absolute value, such as setting min to -0.5 and max to +0.5.
> This ensures when you use the "difference" color table, the value "0" maps
> to white, negative to blue, and positive to red.
>
> --
>
> Jeremy Meredith
>
> Oak Ridge National Laboratory
>
> *From:* Willie Maddox [mailto:wmaddox at mymail.mines.edu]
> *Sent:* Tuesday, March 30, 2010 3:23 PM
> *To:* visit-users at email.ornl.gov
> *Subject:* [visit-users] Creating length dependent coloured bonds in VisIt
>
> Dear Sir or Madam,
>
> I am trying to find a software package that will allow me to manipulate the
> colouring of bonds between atoms based on the bond length.
>
> For example, if the ideal bond length in a particular crystal is say 2.0
> angstroms and I perform a slab relaxation, I would like to display the bonds
> that got stretched with one colour (say blue), and the bonds that got
> compressed, with another (red maybe).
>
> In addition, I would like to be able to map the range of bond lengths in
> this relaxed crystal to the red/blue colour gradient, or any other colour
> gradient for that matter. In other words, a bond length of 2.2 Angstroms
> would appear "more" blue than a neighbouring bond 2.1 Angstroms long. Vice
> versa for the reds of course.
>
> I've spent a week scouring many crystal visualisation packages, both
> proprietary (Materials Studio, Crystal Maker, etc.) and open source (VESTA,
> VMD, etc.), and have yet to find any that can do this. However, VisIt looks
> like its "Expressions" options may be the ticket, but I'm not sure exactly
> how to implement it.
>
> Question: Can VisIt do this?
>
> Thanks in advance!
>
> -Willie Maddox
> Computational Materials Science
> Colorado School of Mines
>
>
> --
> List subscription information:
> https://*email.ornl.gov/mailman/listinfo/visit-users
> Searchable list archives: https://*email.ornl.gov/pipermail/visit-users
>
> VisIt Users Wiki: http://*visitusers.org/
> Frequently Asked Questions for VisIt: http://*visit.llnl.gov/FAQ.html
>
>
>
> --
> List subscription information: https://*
> email.ornl.gov/mailman/listinfo/visit-users
> Searchable list archives: https://*email.ornl.gov/pipermail/visit-users
> VisIt Users Wiki: http://*visitusers.org/
> Frequently Asked Questions for VisIt: http://*visit.llnl.gov/FAQ.html
>
>
>
> --
>
> ======================================================================
> Brad Whitlock                   Lawrence Livermore National Laboratory
> whitlock2 at llnl.gov
> (925)424-2614
> ======================================================================
>
> --
> List subscription information:
> https://email.ornl.gov/mailman/listinfo/visit-users
> Searchable list archives: https://email.ornl.gov/pipermail/visit-users
> VisIt Users Wiki: http://visitusers.org/
> Frequently Asked Questions for VisIt: http://visit.llnl.gov/FAQ.html
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.ornl.gov/pipermail/visit-users/attachments/20100330/050a91e9/attachment.html>


More information about the visit-users mailing list