# Tag Info

16

I prefer to just download the data from the remote disks and then do the plots on my own local machine, which has all of my favorite tools for post-processing my data. I understand that this can be inconvenient though. It is indeed possible to run a GUI on a remote supercomputer though, if you first use ssh -X or ssh -Y when signing into the remote machine (...

15

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, and my answer was to use this free tool in which you just copy and paste the 3 spatial coordinates along with the name of the element, for each row of the XYZ ...

15

ASE The ASE library has an atom object with built-in get_angle, get_dihedral and get_distance methods that do just that.

14

Here is the simple bash script for testing kpoint energy convergence for VASP you can use same logic in python but you can also use this. for i in seq 1 1 5 # change the range needed do cat <<EOF >KPOINTS MONK #header file 0 M $i$i $i 0 0 0 EOF mkdir$i cp INCAR $i/ cp POSCAR$i/ cp POTCAR $i/ cp KPOINTS$i/ cd $i vasp-5.4.4 # This is vasp run ... 14 There is an example in the pyiron documentation to calculate energy volume curves: https://pyiron.readthedocs.io/en/latest/source/notebooks/energy_volume_curve.html And the corresponding jupyter notebook is available in the pyiron repository: https://github.com/pyiron/pyiron_atomistics/blob/master/notebooks/energy_volume_curve.ipynb To adjust the energy ... 13 Open Babel First, the command-line version: obabel c60.xyz -oreport Yields: All interatomic distances All bond angles All connected torsions Also, partial charges e.g. INTERATOMIC DISTANCES C 1 C 2 C 3 C 4 C 5 C 6 ------------------------------------------------------------------ C 1 ... 13 It would probably be easier to use some software such as WinSCP. It allows you to select the location on your remote system and synchronise with the local system by matching either the time stamp or size (and probably other properties). Also if you are using Linux, read the answers on this Stack Overflow question to get an idea of alternatives. This way you ... 12 It helps to know that in computational chemistry the collection of distance, angle and dihedral coordinates is collectively known as "z-matrix coordinates". Unless you care to reinvent the wheel (which is not a bad exercise), it suffices to perform a web search for "python internal to zmatrix coordinates". For instance, the "... 12 If the crystal unit cell is in a format readable by ASE, then you can use code that looks approximately like so: from ase.io import read atoms = read("myfilename.xyz") bandpath = atoms.cell.bandpath() This bandpath object will have the relevant attributes to play with (kpoint coordinates, special point labels, special point coordinates, etc). ... 11 If you are really interested in learning how to generate the path, I strongly advice you to avoid using any automatic tool like suggested in previous answers. In the Wiki page entitle Brillouin zone you can find the first Brillouin zone for each one of the Bravais lattice. This Wiki is based on the following paper: Setyawan, Wahyu; Curtarolo, Stefano (2010).... 10 Consider a graphene Hamiltonian, whose dispersion looks a lot like the one in your figure. Per these notes, its k-space Hamiltonian may be written as: $$H(k)=-t \sum_{\delta} [\cos(k\cdot\delta)\sigma_x-\sin(k\cdot\delta)\sigma_y],$$ where$k=(k_x,k_y)$,$\delta$are nearest-neighbor vectors,$\sigma_i$are Pauli matrices and$t$is a hopping parameter. ... 10 The dipole moment is typically a vector quantity, and the "total dipole moment" which is the$A$in your question description and the black arrow in the figure below, is the vector sum of all constituent dipole moments the system (red arrows in the figure below): In your case you have vectors such as:$26.78 \, \hat{x} -6.31\, \hat{y} + 27.17\,...

10

RDKit This is pretty easy to do in RDKit. If you want the molecular formula, you can just use CalcMolFormula(): from rdkit import Chem from rdkit.Chem.rdMolDescriptors import CalcMolFormula # e.g. cysteine mol = Chem.MolFromSmiles("C([C@@H](C(=O)O)N)S") formula = CalcMolFormula(mol) It is also very easy to get all of the unique heteroatoms: from ...

10

This is the script I wrote for convergence testing in Quantum ESPRESSO using Bash and Python. According to Stefaan Cottenier, hydrostatic pressure on a unit cell is the property tested for convergence because it is quite sensitive to numerical precision. If this property is converged with respect to the k-mesh, many other less sensitive properties will be ...

10

One way of determining this is using the projected density of states (P-DOS) This resolves the DOS into specific orbitals thereby allowing you to discretize each orbitals weight for a specific energy. $\mathrm{PDOS}_\nu(E) = \sum_i \psi^*_{i,\nu} [\mathbf S | \psi_{i}\rangle]_\nu D(E-\epsilon_i)$ Note here that $|\psi_i\rangle$ is the $i$th eigenvector and ...

10

What you're trying to do can actually be done very quickly, without any loops, and can even be ported to make valuable use of a GPU. Here's a quick example that you can test yourself in octave-online: shots=0:50:250 lens = 0:10 bsxfun(@times,shots',lens) The outputs are as follows: shots=[0 50 100 150 200 250] lens =[0 1 2 3 4 5 ...

10

Assuming that your sample code is really what you are looking for (which I doubt judging by the full code example you had posted originally), the answer by @vtan707 would work, but is very awkward because of its requirement for specifically shaped 2D arrays. Having to do nested calls of np.array on a single-element list of a function output kinda gives it ...

9

Pybel Pybel is good for this type of task https://open-babel.readthedocs.io/en/latest/UseTheLibrary/Python_PybelAPI.html import pybel global __ATOM_LIST__ __ATOM_LIST__ = \ ['h', 'he', ...

9

Most of the problem here appears to be because constraints in the test system default to app.HBonds, which means all bonds to hydrogen atoms are constrained. Something goes very weird when you force a large, unphysical change on the system, and then try to apply HBond constraints (it looks to me like it isn't even constraining HBonds to the unphysical ...

9

The DATASET "MillerIndices" stores the vectors of reciprocal space, namely $n_1$, $n_2$, and $n_3$ in following equation: $$\dfrac{1}{\sqrt{V}}e^{i\vec{G}\cdot\vec{r}}=\dfrac{1}{\sqrt{V}}e^{i(n_1 \vec{a}_1+n_2\vec{b}_2+n_3\vec{b}_3)\cdot\vec{r}}$$ I assume that you have $m$ plane waves, then the data space should be $(m,3)$. As you said, the ...

9

ErtlFunctionalGroupsFinder A Java library for automated functional group implemented with the Chemical Development Kit (CDK) program. It should run on Windows/Mac/Linux operating systems. It relies on the Ertl algorithm, which is also used by the RDKit for functional group detection. A key difference between the two implementations seems to be in their ...

9

You could fool the MDAnalysis RDF function InterRDF by setting an artificial cell of a size large enough so that the periodic boundary conditions don't cause any atom to be counted twice. This can be done by adding the following lines before computing the rdf. It basically creates a cell twice as large as the largest distance in the selected frame of the ...

8

Here is an example for Open Babel 3 in Python 3.8. It's not really that pythonic, but you can make use of powerful features like SMARTS pattern and have the support for pretty much any chemical file format. from openbabel import openbabel as ob obconv = ob.OBConversion() obconv.SetInFormat('xyz') mol = ob.OBMol() obconv.ReadFile(mol, 'test.xyz') obsmarts = ...

8

VASPKIT VASPKIT offers a tool to plot 3D band structure using VASP. The method select K-path on a surface of the Irreducilbe Brillouin zone and calculate the K-dependent band energies on those K-points. An example 3D plot of graphene bandstructure is shown below For more details refer this tutorial A few more plots

8

Thanks to Tyberius for pointing out one issue in the database in their comment. The pycalphad database parser is strict, but also tries to prevent ambiguities or mistakes. I made the following corrections: Changed ELEMENT Y HCP_A3 8.89059+01 5.9664E+03 4.4434E+01 ! to ELEMENT Y HCP_A3 8.89059E+01 5.9664E+03 4.4434E+01 (adding E to the exponent of the mass) ...

8

Speculating a comparison of the outputs by both programs may help, I let RDKit process to SMILES to yield a representation including the atom indices. Derived from the cookbook, the MWE for the Jupyter notebook was from rdkit import Chem from rdkit.Chem.Draw import IPythonConsole from rdkit.Chem import Draw from rdkit.Chem import rdDepictor from rdkit.Chem....

8

You can use dot multiplication to achieve this: import numpy as np shot = np.array([np.arange(0, 100, 50)]).T lens = np.array([np.arange(10)]) total = np.dot(shot,lens) print(total) This gives you the below results: [[ 0 0 0 0 0 0 0 0 0 0] [ 0 50 100 150 200 250 300 350 400 450]]

7

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 slow. Calculating the distance matrix in scipy is much faster. The distance matrix alone is not very helpful. You have to check every distance with the sum of the ...

7

You can use QE.6xxx with the support of the hdf5 library. To realize that purpose, you should add the following command when you compile QE: --with-hdf5=yes or take a look at the official guide. Then the saved wavefunction can be manipulated with the python package h5py. import h5py read_wf=h5py.File("wfc1.hdf5")

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