Questions tagged [programming]
Questions about programming.
21
questions
5
votes
2
answers
100
views
Explicit form of Hartree Fock analytic gradient with contracted GTOs? With or without density fitting
Does anyone know of a paper, textbook, or other resource which outlines the expression for the analytic gradient of the HF energy (restricted or otherwise) in terms of Dunning's contracted Gaussian-...
19
votes
7
answers
5k
views
Convert XYZ coordinates to Z-matrix
I want to make a python script that will load an xyz file. From the xyz parameters, I need to find the distance between atoms, angle and dihedral between atoms.
The file xyz have this structure:
...
6
votes
3
answers
2k
views
What programming language do matter modelers generally use?
I thought Python was a reasonably popular language among matter modelers.
However, I saw a comment in one of my posted questions (in which I posted a Python code) that the commenter was unfamiliar ...
5
votes
1
answer
193
views
Symmetrization of elastic constants based on rotational symmetry in Pymatgen
I am trying to write a small python script which will symmetrize an elastic tensor based on rotational symmetry of the space group. I started with this link and created a new python script as below.
I ...
7
votes
3
answers
2k
views
Running an ORCA calculation from Python
I'm a master's student and recently I started doing computational chemistry calculations using ORCA program.
This program works by command line and I saw that the majority of computational chemistry ...
7
votes
2
answers
291
views
Python to extract data from two files, and then do a calculation with those data
There are two files named ‘OUTCAR’ and ‘POSCAR’.
The ‘OUTCAR’ file consists of many lines including the following (Screenshot 1):
(It is noted that, there are data for 48 ions in that OUTCAR file, ...
3
votes
2
answers
247
views
Is this "internal error" reproducible when compiling OpenMolcas on other Intel compilers?
The procedure I've been following to build OpenMolcas with an Intel Fortran compiler in the Compute Canada environment is as follows:
...
7
votes
3
answers
311
views
Extracting data from a file, using python or bash. Requesting help
I have some directories, named ‘abc-000, abc-001, abc-002, …… abc-100’. The path of the directory can be, for example, \home\abc-000 and so on.
Inside each directory, there is a file named ‘OUTCAR’. ...
1
vote
1
answer
82
views
Interstitial charge from a cube file: Need help in python coding
I have a test material- two silicon atoms in an unit cell. This particular structure shows evidence of having interstitial charge between the two atoms. I need to find out the amount of this ...
5
votes
1
answer
4k
views
How may I run a .py file in a Jupyter notebook?
In terminal, I run a python code like this way:
python code.py file.txt
Or it might also work as:
./code.py file.txt
Where the ...
3
votes
2
answers
248
views
How to use the GDB debugger with OpenMolcas?
I would like to follow how some variables are changing during an OpenMolcas calculation, and adding WRITE statements has become too tedious. I've compiled with the <...
13
votes
3
answers
226
views
Improving my programming for computational chemistry/physics
What are some good textbooks or online resources to improve my skills in C++, C and Fortran, specifically for computational chemistry.
For example, I am interested in learning about parallelisation ...
6
votes
1
answer
227
views
Which functionals should I include for a simple hydrogen atom system?
I am writing my own (orbital-free, for now) 3D density functional theory code from scratch. It currently works correctly for the simple harmonic oscillator potential $V_\text{ext}(\mathbf r) = \frac12\...
3
votes
2
answers
336
views
How to merge two files (molecule structure and file property) into one?
I've run some calculations with the xtb software. From its output I got XYZ and MOL files ...
6
votes
1
answer
1k
views
Why does VASP use -O2 optimization by default rather than -O3?
When compiling VASP, I am wondering why the
OFLAG = -O2
is suggested as default. For performance reason, I would use
...
4
votes
2
answers
553
views
Find with grep in terminal last hit in log file
I use grep to find the string "Converged?" with the terminal in several folders to read the output from my gaussian ...
14
votes
1
answer
163
views
Looking for crystal generator library
I am looking for a C or a C++ library that can do crystal generation, that is, multiply unit cells in one or more directions with symmetry information. (in other words, generate supercells).
I have ...
7
votes
1
answer
264
views
Calculate number of electrons per shell for an atom
Suppose you are given the atomic number of an element, e.g. Technetium, which is 43. Is it possible to return an array which shows the distribution of electrons across different shells of an atom ...
21
votes
9
answers
9k
views
How to master Fortran with minimal effort?
Fortran language is used in many first-principles matter modeling codes, such as VASP and QE. These codes usually include many ...
9
votes
1
answer
312
views
Help with translating Hamiltonian into matrix
Eq. 19 in this paper gives the following Hamiltonian:
$\sigma_a, \tau_a, \eta_a$ are respectively the spin, sublattice pseudospin and valley pseudospin respectively.
Normally, I would have chosen a ...
13
votes
3
answers
864
views
Script to generate input files for benchmark purpose
I would like to run some benchmark of different DFT functionals.
The most time consuming part is obviously the generation of the input files.
I'm not a programmer, but I think this could be done by ...