Skip to content
  • Home
  • Recent
Collapse
Brand Logo
CRYSTAL23
Latest v1.0.1
Tutorials Try the Demo Get a License
Tutorials Try the Demo Get a License Instagram
  1. Home
  2. CRYSTAL
  3. Other Questions
  4. Printing the eignenvectors and values after a run has finished

Printing the eignenvectors and values after a run has finished

Scheduled Pinned Locked Moved Other Questions
8 Posts 3 Posters 271 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CaesarSaladundefined Offline
    CaesarSaladundefined Offline
    CaesarSalad
    wrote last edited by
    #1

    Hello,

    Is there a way to print the eigenvectors and eigenvalues of a system after a simulation has finished running?

    Chris

    1 Reply Last reply
    0
    • eascrizziundefined Offline
      eascrizziundefined Offline
      eascrizzi Expert
      wrote last edited by eascrizzi
      #2

      Hi Chris!

      You can perform a NEWK properties calculation (see page 346 of CRYSTAL User's Manual) starting from your converged wavefunction and select the printing options for eigenvalues and eigenvectors.

      Hope this answers your question

      Eleonora

      1 Reply Last reply
      0
      • CaesarSaladundefined Offline
        CaesarSaladundefined Offline
        CaesarSalad
        wrote last edited by
        #3

        Hi Eleonora,

        Thanks for your reply. So the calculation can simply be ran as:

        NEWK
        6 6
        1 66 67

        ? Or do I have to run two separate calculations, one with "1 66" and one with "1 67" on the second line?

        Chris

        1 Reply Last reply
        0
        • GiacomoAmbrogioundefined Offline
          GiacomoAmbrogioundefined Offline
          GiacomoAmbrogio Developer
          wrote last edited by
          #4

          Hi Chris,

          If you want to switch on printing options 66 and 67, your input should be:

          NEWK
          6 6
          1 2
          66 xxx
          67 yyy
          

          where xxx and yyy are the numbers "N" specified in the manual (see page 443, column input)

          Let me know if you manage to get the correct printings

          Giacomo Ambrogio, PhD Student
          Department of Chemistry - University of Torino
          V. Giuria 5, 10125 Torino (Italy)

          CaesarSaladundefined 1 Reply Last reply
          0
          • CaesarSaladundefined Offline
            CaesarSaladundefined Offline
            CaesarSalad
            replied to GiacomoAmbrogio last edited by
            #5

            Hi Giacomo,

            Thanks for the input. It seems that this would only print the eigenvalues. The eigenvectors won't be printed and I get this error at the end of the output file:

            FERMI ENERGY AND DENSITY MATRIX CALCULATION ON COMPUTED EIGENVECTORS
            DENSITY MATRIX AT SCF CYCLE ( 3+1)
            SPIN LOCKING: NO ENERGY GAP COMPUTED

            CORE DENSITY MATRIX CALCULATION
            TTTTTTTTTTTTTTTTTTTTTTTTTTTTTT NEWK TELAPSE 16.38 TCPU 14.78
            ERROR **** properties **** END OF DATA IN INPUT DECK

            My input is:

            NEWK
            6 6
            1 2
            66 -505
            67 -505

            ..ran via crystal_properties binaries. Could it be because 67 works only by printing at the end of the SCF cycles?

            Chris

            1 Reply Last reply
            0
            • GiacomoAmbrogioundefined Offline
              GiacomoAmbrogioundefined Offline
              GiacomoAmbrogio Developer
              wrote last edited by
              #6

              Hi Chris,

              The error comes from the missing END line that should close the NEWK block.

              As for print option 67: it should work in properties as well as in crystal. That said, these print flags are not very well tested, and some of them may have broken in newer versions. I took a look in the code, and I can confirm that the -505 trick will not work here. Instead, you should set the value to 999 to get the maximum possible output (ie all the virtual states, or 499 for just the occupied states).

              One more note: in the NEWK section this option was never extended to parallel execution, so you’ll need to run it on a single CPU core if you want it to print.

              Hope this helps.

              Giacomo Ambrogio, PhD Student
              Department of Chemistry - University of Torino
              V. Giuria 5, 10125 Torino (Italy)

              1 Reply Last reply
              0
              • CaesarSaladundefined Offline
                CaesarSaladundefined Offline
                CaesarSalad
                wrote last edited by
                #7

                Hi Giacomo,

                Sorry for the late reply. I can confirm that 999 works in this scenario even using parallel execution settings. I tried to pass the HPC the command to run the simulation on a single CPU core but it kept complaining that it is not set up to do so, so I ran it on multiple CPUs and it worked. However, it is printing the eigenvectors for K points 48 and 80. Is there a way to print the eigenvectors at the Gamma point only? Additionally, when I try:

                NEWK
                4 4
                1 2
                66 -505
                67 999
                END

                It will not print the eigenvectors (just the eigenvalues), even though the initial crystal run for calculating the ground-state via DFT was ran with SHRINK 4 4. There is no error at the end of the output file, it just ends. I'm not sure why, to be honest, but maybe it's got something to do with the number of CPUs this is running on? I might try to run it with less than 80 CPU cores (which is the standard number I use for Crystal simulations) and see what happens. In the meantime if you have any insight I would greatly appreciate it,

                Thanks in advance for your help,

                Chris

                1 Reply Last reply
                0
                • GiacomoAmbrogioundefined Offline
                  GiacomoAmbrogioundefined Offline
                  GiacomoAmbrogio Developer
                  wrote last edited by
                  #8

                  Hi Chris,

                  The reason you only see a few k-points printed is indeed that the printing options are not fully supported in parallel execution. In a parallel run, each MPI process handles a subset of the k-points, and only process 0 writes to the output file. As a result, you’ll only see the k-points assigned to process 0, which can be just a few, or even none, depending on how they are distributed.

                  By default, the code distributes k-points in a round-robin fashion starting from the last process, so the gamma point is typically assigned to the last process and therefore never printed in a parallel execution.

                  This behavior applies to both options 66 and 67.

                  Try running the following input:

                  NEWK
                  4 4
                  1 2
                  66 999
                  67 999
                  END
                  

                  However, you’ll need to run it on a single process for the eigenvectors to be printed correctly.

                  If the calculation is too expensive to run on a single process, we may need to find an alternative approach to extract those values (though that won’t be straightforward).

                  Giacomo Ambrogio, PhD Student
                  Department of Chemistry - University of Torino
                  V. Giuria 5, 10125 Torino (Italy)

                  1 Reply Last reply
                  1

                  Powered by Crystal Solutions
                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Home
                  • Recent