Visualizing atoms in XYZ file with colors representing partial charges

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
1












I have a file containing the atomic coordinates (in XYZ format) of a structure, and I also have a list of the partial atomic charges for each atom. I'd like to create an image of the structure where the colors of the atoms correspond to the computed charges. What are some good ways for doing this?










share|improve this question























  • (In reply to a deleted comment). I'd be happy if it helps, but I see no benefit in doing so. The XYZ coordinates are a simple $ntimes3$ matrix, and the charges are stored as a $ntimes1$ vector. The filetype is irrelevant (I can freely convert to any format of your choosing -- CIF, *CAR, XYZ, JMol, etc.).
    – Argon
    2 hours ago















up vote
3
down vote

favorite
1












I have a file containing the atomic coordinates (in XYZ format) of a structure, and I also have a list of the partial atomic charges for each atom. I'd like to create an image of the structure where the colors of the atoms correspond to the computed charges. What are some good ways for doing this?










share|improve this question























  • (In reply to a deleted comment). I'd be happy if it helps, but I see no benefit in doing so. The XYZ coordinates are a simple $ntimes3$ matrix, and the charges are stored as a $ntimes1$ vector. The filetype is irrelevant (I can freely convert to any format of your choosing -- CIF, *CAR, XYZ, JMol, etc.).
    – Argon
    2 hours ago













up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1





I have a file containing the atomic coordinates (in XYZ format) of a structure, and I also have a list of the partial atomic charges for each atom. I'd like to create an image of the structure where the colors of the atoms correspond to the computed charges. What are some good ways for doing this?










share|improve this question















I have a file containing the atomic coordinates (in XYZ format) of a structure, and I also have a list of the partial atomic charges for each atom. I'd like to create an image of the structure where the colors of the atoms correspond to the computed charges. What are some good ways for doing this?







quantum-chemistry computational-chemistry theoretical-chemistry






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 22 mins ago

























asked 3 hours ago









Argon

828517




828517











  • (In reply to a deleted comment). I'd be happy if it helps, but I see no benefit in doing so. The XYZ coordinates are a simple $ntimes3$ matrix, and the charges are stored as a $ntimes1$ vector. The filetype is irrelevant (I can freely convert to any format of your choosing -- CIF, *CAR, XYZ, JMol, etc.).
    – Argon
    2 hours ago

















  • (In reply to a deleted comment). I'd be happy if it helps, but I see no benefit in doing so. The XYZ coordinates are a simple $ntimes3$ matrix, and the charges are stored as a $ntimes1$ vector. The filetype is irrelevant (I can freely convert to any format of your choosing -- CIF, *CAR, XYZ, JMol, etc.).
    – Argon
    2 hours ago
















(In reply to a deleted comment). I'd be happy if it helps, but I see no benefit in doing so. The XYZ coordinates are a simple $ntimes3$ matrix, and the charges are stored as a $ntimes1$ vector. The filetype is irrelevant (I can freely convert to any format of your choosing -- CIF, *CAR, XYZ, JMol, etc.).
– Argon
2 hours ago





(In reply to a deleted comment). I'd be happy if it helps, but I see no benefit in doing so. The XYZ coordinates are a simple $ntimes3$ matrix, and the charges are stored as a $ntimes1$ vector. The filetype is irrelevant (I can freely convert to any format of your choosing -- CIF, *CAR, XYZ, JMol, etc.).
– Argon
2 hours ago











2 Answers
2






active

oldest

votes

















up vote
2
down vote













Have you tried VMD link? It's free, up-to-date, will work with .xyz format files, and would allow you to set charge (or other property) as a color-sensitive characteristic. Here's an example using the bonding coordination (number of nearest neighbors) in a crystal (although only the surface is loaded to conserve memory)
enter image description here






share|improve this answer








New contributor




Rolf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    1
    down vote













    As far as I know, no software can do this right away but with some work, this should be possible.



    Use CYLview to create a povray file, change the atoms to the desired color and render it with Povray. The problem here is that the coordinates of the xyz file and the povray are not the same. But as far as I can tell the numbering stays the same. So if the 3rd atom in your xyz is this:



    N -1.227679000 0.558365000 0.000000000


    the 3rd sphere in the povray file would look like that:



    sphere {<-1.9762436, 0.9491377, 0.0000000> 0.2812500
    pigmentcolor rgbt <0.4,0.4,1.0,0.00>
    finishF_normal


    All you need to do is change the color here. It should also be pretty easy to automate this color change with some lines of code.



    So you can go from this
    enter image description here



    to for example this
    enter image description here



    by simply changing the color value shown above to



    pigmentcolor rgbt <0.2,0.8,1.0,0.00>





    share|improve this answer




















      Your Answer




      StackExchange.ifUsing("editor", function ()
      return StackExchange.using("mathjaxEditing", function ()
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      );
      );
      , "mathjax-editing");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "431"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fchemistry.stackexchange.com%2fquestions%2f101831%2fvisualizing-atoms-in-xyz-file-with-colors-representing-partial-charges%23new-answer', 'question_page');

      );

      Post as a guest






























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote













      Have you tried VMD link? It's free, up-to-date, will work with .xyz format files, and would allow you to set charge (or other property) as a color-sensitive characteristic. Here's an example using the bonding coordination (number of nearest neighbors) in a crystal (although only the surface is loaded to conserve memory)
      enter image description here






      share|improve this answer








      New contributor




      Rolf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





















        up vote
        2
        down vote













        Have you tried VMD link? It's free, up-to-date, will work with .xyz format files, and would allow you to set charge (or other property) as a color-sensitive characteristic. Here's an example using the bonding coordination (number of nearest neighbors) in a crystal (although only the surface is loaded to conserve memory)
        enter image description here






        share|improve this answer








        New contributor




        Rolf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.



















          up vote
          2
          down vote










          up vote
          2
          down vote









          Have you tried VMD link? It's free, up-to-date, will work with .xyz format files, and would allow you to set charge (or other property) as a color-sensitive characteristic. Here's an example using the bonding coordination (number of nearest neighbors) in a crystal (although only the surface is loaded to conserve memory)
          enter image description here






          share|improve this answer








          New contributor




          Rolf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          Have you tried VMD link? It's free, up-to-date, will work with .xyz format files, and would allow you to set charge (or other property) as a color-sensitive characteristic. Here's an example using the bonding coordination (number of nearest neighbors) in a crystal (although only the surface is loaded to conserve memory)
          enter image description here







          share|improve this answer








          New contributor




          Rolf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          share|improve this answer



          share|improve this answer






          New contributor




          Rolf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.









          answered 2 hours ago









          Rolf

          974




          974




          New contributor




          Rolf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.





          New contributor





          Rolf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.






          Rolf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















              up vote
              1
              down vote













              As far as I know, no software can do this right away but with some work, this should be possible.



              Use CYLview to create a povray file, change the atoms to the desired color and render it with Povray. The problem here is that the coordinates of the xyz file and the povray are not the same. But as far as I can tell the numbering stays the same. So if the 3rd atom in your xyz is this:



              N -1.227679000 0.558365000 0.000000000


              the 3rd sphere in the povray file would look like that:



              sphere {<-1.9762436, 0.9491377, 0.0000000> 0.2812500
              pigmentcolor rgbt <0.4,0.4,1.0,0.00>
              finishF_normal


              All you need to do is change the color here. It should also be pretty easy to automate this color change with some lines of code.



              So you can go from this
              enter image description here



              to for example this
              enter image description here



              by simply changing the color value shown above to



              pigmentcolor rgbt <0.2,0.8,1.0,0.00>





              share|improve this answer
























                up vote
                1
                down vote













                As far as I know, no software can do this right away but with some work, this should be possible.



                Use CYLview to create a povray file, change the atoms to the desired color and render it with Povray. The problem here is that the coordinates of the xyz file and the povray are not the same. But as far as I can tell the numbering stays the same. So if the 3rd atom in your xyz is this:



                N -1.227679000 0.558365000 0.000000000


                the 3rd sphere in the povray file would look like that:



                sphere {<-1.9762436, 0.9491377, 0.0000000> 0.2812500
                pigmentcolor rgbt <0.4,0.4,1.0,0.00>
                finishF_normal


                All you need to do is change the color here. It should also be pretty easy to automate this color change with some lines of code.



                So you can go from this
                enter image description here



                to for example this
                enter image description here



                by simply changing the color value shown above to



                pigmentcolor rgbt <0.2,0.8,1.0,0.00>





                share|improve this answer






















                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  As far as I know, no software can do this right away but with some work, this should be possible.



                  Use CYLview to create a povray file, change the atoms to the desired color and render it with Povray. The problem here is that the coordinates of the xyz file and the povray are not the same. But as far as I can tell the numbering stays the same. So if the 3rd atom in your xyz is this:



                  N -1.227679000 0.558365000 0.000000000


                  the 3rd sphere in the povray file would look like that:



                  sphere {<-1.9762436, 0.9491377, 0.0000000> 0.2812500
                  pigmentcolor rgbt <0.4,0.4,1.0,0.00>
                  finishF_normal


                  All you need to do is change the color here. It should also be pretty easy to automate this color change with some lines of code.



                  So you can go from this
                  enter image description here



                  to for example this
                  enter image description here



                  by simply changing the color value shown above to



                  pigmentcolor rgbt <0.2,0.8,1.0,0.00>





                  share|improve this answer












                  As far as I know, no software can do this right away but with some work, this should be possible.



                  Use CYLview to create a povray file, change the atoms to the desired color and render it with Povray. The problem here is that the coordinates of the xyz file and the povray are not the same. But as far as I can tell the numbering stays the same. So if the 3rd atom in your xyz is this:



                  N -1.227679000 0.558365000 0.000000000


                  the 3rd sphere in the povray file would look like that:



                  sphere {<-1.9762436, 0.9491377, 0.0000000> 0.2812500
                  pigmentcolor rgbt <0.4,0.4,1.0,0.00>
                  finishF_normal


                  All you need to do is change the color here. It should also be pretty easy to automate this color change with some lines of code.



                  So you can go from this
                  enter image description here



                  to for example this
                  enter image description here



                  by simply changing the color value shown above to



                  pigmentcolor rgbt <0.2,0.8,1.0,0.00>






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 hours ago









                  DSVA

                  4,55011335




                  4,55011335



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fchemistry.stackexchange.com%2fquestions%2f101831%2fvisualizing-atoms-in-xyz-file-with-colors-representing-partial-charges%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      What does second last employer means? [closed]

                      Installing NextGIS Connect into QGIS 3?

                      One-line joke