Skip to main content
28 votes
Accepted

How to master Fortran with minimal effort?

"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 ...
Nike Dattani - No Free Time's user avatar
20 votes

How to master Fortran with minimal effort?

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 ...
Vladimir F Героям слава's user avatar
14 votes

How to master Fortran with minimal effort?

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 ...
JDługosz's user avatar
  • 241
14 votes

How to master Fortran with minimal effort?

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. ...
Scientist's user avatar
  • 241
13 votes

Improving my programming for computational chemistry/physics

My Story As an undergrad doing my first computational research project, I was told that I would be programming in FORTRAN. I remember being very nervous about this because I had never touched FORTRAN ...
Nike Dattani - No Free Time's user avatar
11 votes

How to master Fortran with minimal effort?

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....
Buttonwood's user avatar
  • 1,724
11 votes
Accepted

How to read QE's wfc*.dat files with python

With python, you can open a binary file using the 'rb' option in your open statement. Then using ...
NehZio's user avatar
  • 156
10 votes

How to master Fortran with minimal effort?

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 ...
Tman's user avatar
  • 101
9 votes

How to master Fortran with minimal effort?

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 ...
AnoE's user avatar
  • 191
8 votes
Accepted

What is the format of the electron-density data in a CHGCAR file?

From the Vaspwiki, the CHGCAR file writes out the density using this Fortran snippet: WRITE(IU,FORM) (((C(NX,NY,NZ),NX=1,NGXF),NY=1,NGYF),NZ=1,NGZF) Basically, this ...
Tyberius's user avatar
  • 15.9k
6 votes

Improving my programming for computational chemistry/physics

Dr. Victor Eijkhout at Texas Advanced Computing Center (TACC) has some excellent resources at his website The Art of HPC, including freely available textbooks on Introduction to High-Performance ...
Anyon's user avatar
  • 4,891
6 votes

Exploiting 8-fold symmetry of ERI tensor for building Coulomb and Exchange matrices

AFAIK the standard way is to obtain the memory efficiency at the expense of some code repetition in the innermost loop. A preliminary example goes like: Construct a nested loop that only loops over ...
wzkchem5's user avatar
  • 10.2k
5 votes

How to master Fortran with minimal effort?

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 ...
Richard M Bertrand's user avatar
5 votes
Accepted

How to use the GDB debugger with OpenMolcas?

pymolcas runs each program as a separate process, so you need to insert gdb before each individual program call, and not before <...
Jellby's user avatar
  • 166
4 votes
Accepted

wannier90 compilation error (MPI)

This problem is per see, not a bug in the code. The problem is that fortran does not, implicitly, enforce data-type similarity between arguments (much like C). However, this is not standard compliant (...
nickpapior's user avatar
  • 4,394
4 votes
Accepted

Abaqus UMAT [Fortran]: how to call a function from another function without getting "unresolved external symbol"

Just to wrap this up, the error wound being that GET_B wasn't calling GET_A, but rather ...
Tyberius's user avatar
  • 15.9k
4 votes
Accepted

Reading DCD files using Python without using third party packages?

With some digging around, I found this webpage which gave some hints to the specific padding required to read the various data from the DCD header. Even though the data given in the above mentioned ...
Hemanth Haridas's user avatar
4 votes

Improving my programming for computational chemistry/physics

Just to complement previous and more detailed answers by @Nike Dattani and @Anyon. I found a very useful reference to review Modern Fortran and paralellization the book by Milan Curcic: Milan Curcic, ...
PAEP's user avatar
  • 195
3 votes
Accepted

Siesta 5.0 compilation fails with "Deferred-length character component 'message' at (1) is not yet supported" message

TL;DR: Please update your compiler suite (GCC) to a more modern compiler suite (e.g., the latest version of GCC). I think you already have a couple of replies to your question that point you in the ...
jme52's user avatar
  • 150
3 votes
Accepted

About the order of indices in basis set expansion

I think it has less to do with the language the equations were written in and more with where MO coefficients are used in the program. Let's start by writing the MO expansion in matrix form: $$\Phi=C^\...
Tyberius's user avatar
  • 15.9k
2 votes

What is the format of the electron-density data in a CHGCAR file?

VESTA can understand the data format of CHGCAR outputted by VASP. You just need to move <...
Jack's user avatar
  • 15.4k
2 votes

How to master Fortran with minimal effort?

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" ...
M.Todd Hess's user avatar
2 votes

Why does naming a variable "NU" instead of e.g. "ANU" change the output of my UMAT? (Abaqus/Fortran)

Actually, I think it is a problem with the variable declaration. When I add DOUBLE PRECISION :: E, NU, ... all works well.
Noco's user avatar
  • 121
2 votes

Is this "internal error" reproducible when compiling OpenMolcas on other Intel compilers?

After two full work days of struggling with this, I've solved the problem! On the Compute Canada environment (Cedar specifically) and with the settings described in my question, the only three error ...
Nike Dattani - No Free Time's user avatar
2 votes
Accepted

Is this "internal error" reproducible when compiling OpenMolcas on other Intel compilers?

I successfully compiled (using BIGOT=ON) without any issue. My configuration: ...
Camps's user avatar
  • 24.2k
2 votes

How to use the GDB debugger with OpenMolcas?

The following eventually worked for me, especially after Jellby's most recent comment: Compiling: ...
Nike Dattani - No Free Time's user avatar
1 vote
Accepted

Contents of a CHGCAR file and how to read it appropriately in Python?

You can simply use ASE to read CHGCAR file by ase.calculators.vasp.VaspChargeDensity: ...
Shaun Han's user avatar
  • 1,970
1 vote

Inverse Matrix Calculation

This sounds like you are doing something wrong. Even in a non-orthogonal basis the diagonal $\mathbf S$ matrix has the identity matrix in the diagonal. There could be a number of reasons why this ...
nickpapior's user avatar
  • 4,394
1 vote

Programming auto-correlation function calculation

I cannot comment on the Fortran code, but in general, calculating the integrated autocorrelation correctly is a subtle exercise. There is increasing uncertainty in estimating correlation at increasing ...
Shern Ren Tee's user avatar

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