VMD-L Mailing List
From: Philippe Bopp (philippebopp_at_yahoo.com)
Date: Thu Feb 13 2014 - 06:34:59 CST
- Next message: Norman Geist: "AW: namd-l: Solvation in non standard solvent"
- Previous message: Arham Amouie: "Re: Simplest file format that includes atom color?"
- In reply to: Norman Geist: "AW: AW: Simplest file format that includes atom color?"
- Next in thread: Olaf Lenz: "Re: AW: Simplest file format that includes atom color?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
it also works with xyz files with something like this
(assuming the quantity which determins the color is 'charge'
and that it is, as usual, stored as last column of the xyz file,
behind the x,y,z coordinates
(this colors everything according to the 1st configuration,
if you want to update your colors at configuration it's probably more
complicated)
store the following stuff in a file:
mol new {yourfile.xyz} type {xyz} first 0 last -1 step 1 waitfor 1
set in [open yourfile.xyz r]
set out [open somefile.tocheck w]
seek $in 0 start
gets $in line
gets $in line
set i 0
while { [gets $in line] != -1} {
scan $line "%s%s%s%s%s" d1 d2 d3 d4 ch
set sel1 [atomselect top "index $i"]
set i [expr {$i+1}]
$sel1 set charge $ch
puts $out "$i $ch"
$sel1 delete
}
and in the tcl console type:
source the_file_where_you_have_stored_the_stufff_abov
then you can color by charge (I hope)
PB
-----------------
Philippe A. Bopp
professor of chemistry
philippebopp AT yahoo.com (ONLY!)
-----------------
> -----Ursprüngliche Nachricht-----
> Von: Arham Amouie [mailto:erham65t_at_yahoo.com]
> Gesendet: Donnerstag, 13. Februar 2014 09:51
> An: Norman Geist
> Cc: VMD Mailing List
> Betreff: Re: AW: vmd-l: Simplest file format that includes atom color?
>
> I mean coloring by some physical quantity, like velocity, speed,
> potential energy, etc.
>
> Thanks
> Arham Amouei
>
> --------------------------------------------
> On Thu, 2/13/14, Norman Geist <norman.geist_at_uni-greifswald.de> wrote:
>
> Subject: AW: vmd-l: Simplest file format that includes atom color?
> To: "'Arham Amouie'" <erham65t_at_yahoo.com>
> Cc: "VMD Mailing List" <vmd-l_at_ks.uiuc.edu>
> Date: Thursday, February 13, 2014, 9:50 AM
>
>
> #yiv5813604484 #yiv5813604484 --
>
> _filtered #yiv5813604484 {font-family:Helvetica;panose-1:2
> 11 6 4 2 2 2 2 2 4;}
> _filtered #yiv5813604484 {panose-1:2 4 5 3 5 4 6 3 2 4;}
> _filtered #yiv5813604484 {font-family:Calibri;panose-1:2 15
> 5 2 2 2 4 3 2 4;}
> _filtered #yiv5813604484 {font-family:Tahoma;panose-1:2 11
> 6 4 3 5 4 4 2 4;}
> #yiv5813604484
> #yiv5813604484 p.yiv5813604484MsoNormal, #yiv5813604484
> li.yiv5813604484MsoNormal, #yiv5813604484
> div.yiv5813604484MsoNormal
> {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}
> #yiv5813604484 a:link, #yiv5813604484
> span.yiv5813604484MsoHyperlink
> {color:blue;text-decoration:underline;}
> #yiv5813604484 a:visited, #yiv5813604484
> span.yiv5813604484MsoHyperlinkFollowed
> {color:purple;text-decoration:underline;}
> #yiv5813604484 span.yiv5813604484E-MailFormatvorlage17
> {color:#1F497D;}
> #yiv5813604484 .yiv5813604484MsoChpDefault
> {font-size:10.0pt;}
> _filtered #yiv5813604484 {margin:70.85pt 70.85pt 2.0cm
> 70.85pt;}
> #yiv5813604484 div.yiv5813604484Section1
> {}
> #yiv5813604484
>
>
>
>
> Hi Arham,
>
>
>
> I suppose with „each atom can
> have its particular color“ you
> mean coloring by element? If so, the xyz format does already
> allow to mention
> the element of the atoms in the 1st column, see
> http://en.wikipedia.org/wiki/XYZ_file_format, and VMD should use
> it. Otherwise please explain more detailed.
>
>
>
>
>
> Norman Geist.
>
>
>
>
>
>
>
>
>
>
>
> Von:
> owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu]
> Im Auftrag von Arham
> Amouie
>
> Gesendet: Mittwoch, 12. Februar 2014 20:29
>
> An: vmd-l_at_ks.uiuc.edu
>
> Betreff: vmd-l: Simplest file format that includes
> atom color?
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hello
>
>
>
>
>
>
>
>
>
>
>
> I've
> written a MD code for EAM potentials. The typical number of
> atoms is of the order of 1 million. This code saves the
> positions in xyz files
> and I use VMD for visualization. Now, I'm going to
> change the output, so that each
> atom can have its particular color. I used csv format of
> ParaView for this
> reason, but ParaView doesn't work fast for me. What is
> the easiest solution in
> VMD?
>
>
>
>
>
>
>
>
>
>
>
>
> Thanks in
> advance
>
>
>
>
>
> Arham
> Amouei
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Diese E-Mail ist frei von Viren und Malware,
> denn der avast! Antivirus Schutz ist
> aktiv.
>
>
>
>
>
- Next message: Norman Geist: "AW: namd-l: Solvation in non standard solvent"
- Previous message: Arham Amouie: "Re: Simplest file format that includes atom color?"
- In reply to: Norman Geist: "AW: AW: Simplest file format that includes atom color?"
- Next in thread: Olaf Lenz: "Re: AW: Simplest file format that includes atom color?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]