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
17 votes

Convert XYZ coordinates to Z-matrix

ASE The ASE library has an atom object with built-in get_angle, get_dihedral and ...
16 votes

Convert XYZ coordinates to Z-matrix

Open Babel First, the command-line version: obabel c60.xyz -oreport Yields: All interatomic distances All bond angles All connected torsions Also, partial charges ...
Geoff Hutchison's user avatar
16 votes

Convert XYZ coordinates to Z-matrix

Easiest free tool to do this (no download necessary): What you are describing, is the conversion from XYZ format to ZMAT format. How to do this, has been asked here on the Chemistry Stack Exchange, ...
Nike Dattani - No Free Time'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
14 votes
Accepted

pyscf: Why should the choice of pseudopotential determine the total energy, and not the physics?

The energy of a system, be it a molecule or a material, is dependent on the energy reference (or energy zero point) you choose. Common energy references are: The state where all electrons (except for ...
wzkchem5's user avatar
  • 9,670
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
12 votes

Why does VASP use -O2 optimization by default rather than -O3?

This is a great question! Only a VASP developer involved in making that decision would be able to tell you precisely why they made that decision, but I will give you as many useful pieces of ...
Nike Dattani - No Free Time's user avatar
12 votes

Script to generate input files for benchmark purpose

This is an alternative approach with Python scripting. For bash scripting, @NikeDattani has already posted an excellent answer. Let's say you are trying to run the input files with GAMESS. Start with ...
S R Maiti's user avatar
  • 7,021
12 votes

Script to generate input files for benchmark purpose

Consider the MOLPRO input file below template.inp, obtained from here, which was used for a previous MMSE answer about the energy of a zinc atom, except now we're ...
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,579
11 votes
Accepted

Running an ORCA calculation from Python

I ran your script on my PC with Python and it ran perfectly fine. Here are all of the required PC specifications: System Specs ...
Vandan Revanur's user avatar
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
10 votes

What programming language do matter modelers generally use?

I think, I saw similar questions on this stack exchange before, so you may also want to have a look at what others wrote about this topic. Let me answer this from the perspective of research software ...
Gregor Michalicek's user avatar
9 votes
Accepted

Find with grep in terminal last hit in log file

I think this requires piping, see these ServerFault or StackOverFlow questions. For a single file, the two main approaches would be using tail or ...
Anyon's user avatar
  • 4,751
9 votes

Extracting data from a file, using python or bash. Requesting help

I have condensed the bash script by using arrays. ...
Tirtha's user avatar
  • 306
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
9 votes

Calculate number of electrons per shell for an atom

Yes - you can just pre-calculate them and hard-code them into your code, so that the script is simply a conditional switch that returns the required array when given the atomic number, without any ...
wzkchem5's user avatar
  • 9,670
9 votes

Convert XYZ coordinates to Z-matrix

Maybe this comes a bit late. There are some tools which can do this. But I was also interested in doing such a calculation using python. I first started with an iterative process which was terribly ...
rsdel's user avatar
  • 91
8 votes

Help with translating Hamiltonian into matrix

For this type of calculation, I find MATLAB/Octave to be easier, at least for demonstrating what to do. You can add the np. everywhere afterwards if you want to use ...
Nike Dattani - No Free Time's user avatar
8 votes

Script to generate input files for benchmark purpose

To take @Shoubhik's suggestion of Python one step further, you could also consider setting up your benchmark using Snakemake, a Python program/extension designed for building rule-based data analysis ...
Tyberius's user avatar
  • 15.6k
8 votes

Running an ORCA calculation from Python

As the other answers and comments have suggested, the problem is probably coming from how Python is launching ORCA. Because I cannot see any reason the job should run from command line, but not from ...
S R Maiti's user avatar
  • 7,021
7 votes

Extracting data from a file, using python or bash. Requesting help

This is a basic bash script that can be used. One can make this code better too ...
Pranav kumar's user avatar
  • 4,278
7 votes

Which functionals should I include for a simple hydrogen atom system?

As far as I know, the issue of the kinetic energy functional is how people first came to use orbital based functionals in any capacity. Meaning the von Weizsäcker functional, albeit the best orbital ...
Severus Snape's user avatar
7 votes

Looking for crystal generator library

Please feel free to contribute to Open Babel. I'm sure people would use it! Probably the easiest C++ code to adapt would be from Avogadro 1, which directly used the Open Babel API. For example the &...
Geoff Hutchison's user avatar
7 votes
Accepted

How may I run a .py file in a Jupyter notebook?

From jupyter-notebook, you can do: !python script.py I hope this helps.
danbaki's user avatar
  • 86
6 votes

Convert XYZ coordinates to Z-matrix

RDKIT Getting the distance between atoms, angle and dihedral between atoms can be achieved with a python library called rdkit. For the sake of brevity, I will demonstrate using a simple compound: ...
Vandan Revanur's user avatar
6 votes

Convert XYZ coordinates to Z-matrix

...
Jose Pinto's user avatar

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