25

"How to master Fortran programing with minimal effort?" The concept of "mastering" a programming language is a bit subjective, and people typically don't "master" a language with "minimal effort". However as a Fortran programmer myself, there's two strategies I can recommend: (1) Tutorials: As with any programming ...


18

Fortran is a language that evolved strongly and a programmer just maintain very old legacy codes will have very different needs from a programmer maintaining codes written in Fortran 95 and different needs will have a programmer who wants to employ modern techniques and develop new program that use Fortran 2003, 2008 and 2018 (and future revisions). The ...


12

I've done that professionally. In the early '90's, I worked at IBM and spent some time porting FORTRAN "codes" to work on the new RISC SYSTEM / 6000. I found that FORTRAN was such a simple language that it could be worked with without "knowing" it, per se. I obtained a FORTRAN 77 text book, which was rather small and slim, about the same ...


12

For the "why" you should use the tetrahedron method when computing the density of states, check out this paper on exactly that topic! In short, other approaches (e.g. Gaussian smearing) will occasionally obscure (and artificially introduce) some features of the density of states. As for how the method works, quoting from the paper directly about ...


12

The answers provided by others are excellent and rather comprehensive. I would only introduce a few other resources that could help you down the road to find answers to problems more efficiently. Several Fortran communities can be extremely helpful in learning optimization and performance tips or simply to seek help from experts: The Intel Fortran forum has ...


10

Extending the answer by Nike Dattani separately rather than an addition in the text: (2) Practicing, bis: After gaining some familiarity with the language, join a "drill site" like codewars.com where you may train yourself (dojo-like) according to difficulty, or subject. In addition to "you passed the test", there is a community-based ...


9

If you already know Python, perhaps you could try to convert Python code to Fortran code. That is probably the fastest way to get to know the language. Unless you go from one paradigm to another programming principals are mostly the same and it is syntax that differentiates one language from another. If you go through books and tutorials then you will ...


8

I have not had the pleasure of programming Fortran, but have learned and used many other languages over decades, both privately and commercially. My preferred way of diving into a new language may be a bit old-fashioned. I normally stay very much clear of "tutorials" and the like. First thing I do is I grab the official reference documentation - or,...


7

Comparing what each software is capable off, is relative easy: open both webpages and look for feature pages. From SIESTA project page: Total and partial energies. Atomic forces. Stress tensor. Electric dipole moment. Atomic, orbital and bond populations (Mulliken). Electron density. Geometry relaxation, fixed or variable cell. Constant-temperature ...


7

As mentioned by Phil Hasnip in the comments, placing a $\mathrm{Na_2S_2}$ molecule under periodic boundary conditions is akin to simulating a 3d array of these molecules. If the molecule has a nonzero dipole moment, this give rise to an electric (dipole) field between adjacent 2d "planes" of molecules. Unless you take care to orient the dipole of ...


6

Please read the pw.x documentation on the Bravais lattice index (ibrav). The cell vectors for the primitive cell corresponding to the cubic face-centered Bravais lattice (ibrav=2) are v1 = (a/2)(-1,0,1), v2 = (a/2)(0,1,1), v3 = (a/2)(-1,1,0) The cell volume is $V=|v_1 \times v_2 \cdot v_3| = (a/2)^32=328.85\ \mathrm{a.u.}^3$


6

Convergence is always defined in term of tolerance what user choose and based on your data, I will take ecutwfc as 70 Ryd. You should also report run time along with these data. For considering ecutrho I will suggest you to stick with default value, if you are dealing with metallic system. Kinetic energy cutoff (Ry) for charge density and potential: For ...


5

It all depends on the precision you need for your calculations. One way... From your data, if you are concerning only with energies with only one/two decimal places, your calculation are ok since the first value of ecutoff, 240 (as the first two decimal places remains the same for all other calculations). But if you are interested in energies with four ...


5

My suggestion is that you first get an SCF calculation to converge for this structure before you try relaxing, especially if you aren't sure what you're going to get. Then you can proceed to converging the numerical settings like the cutoff energies for your properties of interest. I was able to get an SCF calculation to converge using your input file by ...


4

I think this is a valid question. As the documentation of projwfc.x explains, it computes the Löwdin charges. However, the documentation of pw.x seems to be silent on the scheme used to compute the charges reported by the SCF calculation. Luckily, Quantum ESPRESSO is open-source, so you can look at the source and work back from the Magnetic moment per site ...


4

Mastery and minimal effort create a large conflict. It takes significant effort to master a computer language, beyond just learning the syntax. So, I'd first set my expectations that I need to work hard. Next, yes, the previous authors have very sound suggestions and I'll respectfully not repeat them here. One technique I've used in my many decade career (...


2

Prior to any production calculation, the convergence study with ecutwfc, k-points and ecutrho should be enough. But, the better should be to do a convergence study using the property you are interested in. Please, take a look in previous discussion here, here and here.


1

The best start for learning Fortran it to try to ignore the newer languages you have learned. Fortran is an early language that was very powerful at the time. It is not "Object Oriented" and is not geared for dealing with bits, bytes, addresses. I have taught Assembler, Visual Basic, RPG, PL1, Pascal, Fortran, C, & C++ in colleges. But I will ...


Only top voted, non community-wiki answers of a minimum length are eligible