Skip to content
0
  • Recent
  • Tags
  • Popular
  • SAMSON Connect
  • Get SAMSON
  • Recent
  • Tags
  • Popular
  • SAMSON Connect
  • Get SAMSON
Collapse
SAMSON Forum
  1. Home
  2. SAMSON
  3. SAMSON
  4. Load and visualize a xyz trajectory frame by frame

Load and visualize a xyz trajectory frame by frame

Scheduled Pinned Locked Moved SAMSON
13 Posts 2 Posters 5.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Luis

    Hi,

    How to load a trajectory (in a single xyz file), and visualize it frame by frame?

    Thanks,

    Luis

    DmitriyMarinD
    DmitriyMarinD
    DmitriyMarin
    wrote on last edited by
    #2

    Dear @luis ,

    To load an XYZ file with a trajectory it needs to be in a special format. For example, a trajectory of 3 hydrogens:

    3
     STEP:           1
     H      0.967485      6.687080      5.821420
     H      2.507099      7.320300      6.535832
     H      2.819131      8.163311      3.557150
     3
     STEP:         2
     H      0.987382      6.755653      5.887846
     H      2.528730      7.288068      6.545012
     H      2.899837      8.187620      3.675997
     
    

    The first number is the number of atoms, the following comment line should contain the word 'Step' (or 'step' or 'STEP'), and the atoms in each step should be in the same order.

    Dmitriy,
    The SAMSON Team, https://s-c.io

    1 Reply Last reply
    1
    • DmitriyMarinD
      DmitriyMarinD
      DmitriyMarin
      wrote on last edited by
      #3

      Once loaded, you should see a Path node in the Document view. You can double-click on it to start/stop the trajectory.

      To play the trajectory frame-by-frame or go to a specific frame, you can use the Inspector - right-click on the Path node in the document and click on "Inspect" - this should open the Inspector for this node. Please note, that some functionality of the Inspector is disabled in the Starter plan version, you can try the Standard or Professional plans for a free 30-day trial period.

      If you don't have access to the Inspector, then you can create Conformations out of the Path. For that, right-click on the Path in the document and click on "Create conformations from paths" - this will create conformations in the document for each frame of the Path. Then you can simply double-click on a conformation in the document to restore it.

      Dmitriy,
      The SAMSON Team, https://s-c.io

      1 Reply Last reply
      1
      • L
        L
        Luis
        wrote on last edited by
        #4

        Great. Thanks @DmitriyMarin

        1 Reply Last reply
        0
        • L
          L
          Luis
          wrote on last edited by
          #5

          Hello,

          SAMSON (last version) is crashing when I tried to load a multi-frame xyz file. I haven't tried to visualize trajectories in xyz format for a while, so I don't know if something has changed in the last versions. Could someone please tell me if this is no longer supported. Has the format changed maybe?

          Thanks in advance.

          Luis

          DmitriyMarinD 1 Reply Last reply
          0
          • L Luis

            Hello,

            SAMSON (last version) is crashing when I tried to load a multi-frame xyz file. I haven't tried to visualize trajectories in xyz format for a while, so I don't know if something has changed in the last versions. Could someone please tell me if this is no longer supported. Has the format changed maybe?

            Thanks in advance.

            Luis

            DmitriyMarinD
            DmitriyMarinD
            DmitriyMarin
            wrote on last edited by
            #6

            Hi @Luis ,

            This is still supported and will be supported. Would it be possible for you to share with us the XYZ file that causes the issue (you can send it to contact@samson-connect.net) so that we can check what might be the problem?

            Please note that there are several flavors of XYZ format that vary slightly. While we try to support as many of them as possible, the main format follows the following format:

            NUMBER_OF_ATOMS
            COMMENT_LINE
            ELEMENT_TYPE POS_X POS_Y POS_Z
            

            For example:

            3
             STEP:           1
             H      0.967485      6.687080      5.821420
             H      2.507099      7.320300      6.535832
             H      2.819131      8.163311      3.557150
            3
             STEP:         2
             H      0.987382      6.755653      5.887846
             H      2.528730      7.288068      6.545012
             H      2.899837      8.187620      3.675997
            
            

            Dmitriy,
            The SAMSON Team, https://s-c.io

            1 Reply Last reply
            0
            • L
              L
              Luis
              wrote on last edited by
              #7

              Hi @DmitriyMarin ,

              Thanks for the quick reply. I used the example from your answer, and it crashed the application as shown in the image below

              Screenshot_2024-08-16_09-59-12.png

              1 Reply Last reply
              0
              • DmitriyMarinD
                DmitriyMarinD
                DmitriyMarin
                wrote on last edited by
                #8

                That's strange since it should work. We received your crash report and will check what might be the issue.
                Are you able to open other file formats?

                Dmitriy,
                The SAMSON Team, https://s-c.io

                1 Reply Last reply
                0
                • L
                  L
                  Luis
                  wrote on last edited by
                  #9

                  I am able to open XYZ files with a single frame. LAMMPS data and trajectory files are also loaded without problem. As a workaround I can transform the XYZ trajectory files to LAMMPS data and lammpstrj to visualize them (the bonds are not generated automatically), but it requires to use external tools (or scripting something).

                  1 Reply Last reply
                  0
                  • DmitriyMarinD
                    DmitriyMarinD
                    DmitriyMarin
                    wrote on last edited by
                    #10

                    Thanks for checking! We will try to see what might be an issue here. I will let you know once it is resolved.

                    Dmitriy,
                    The SAMSON Team, https://s-c.io

                    1 Reply Last reply
                    0
                    • DmitriyMarinD
                      DmitriyMarinD
                      DmitriyMarin
                      wrote on last edited by
                      #11

                      Dear @Luis ,

                      We fixed the issue with the XYZ importer for loading trajectories. The module should be updated automatically once you restart SAMSON. Could you please try and check if it works for you now?

                      Dmitriy,
                      The SAMSON Team, https://s-c.io

                      1 Reply Last reply
                      0
                      • L
                        L
                        Luis
                        wrote on last edited by
                        #12

                        Dear @DmitriyMarin ,

                        Thank you very much. It works!

                        With kind regards,

                        Luis

                        DmitriyMarinD 1 Reply Last reply
                        0
                        • L Luis

                          Dear @DmitriyMarin ,

                          Thank you very much. It works!

                          With kind regards,

                          Luis

                          DmitriyMarinD
                          DmitriyMarinD
                          DmitriyMarin
                          wrote on last edited by
                          #13

                          Dear @Luis ,

                          Great! Thanks for checking and for reporting the issue in the first place!

                          Dmitriy,
                          The SAMSON Team, https://s-c.io

                          1 Reply Last reply
                          0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Login or register to search.
                          • First post
                            Last post