Skip to main content

Questions tagged [python]

Questions about or related to Matter Modeling with Python or Python's relationship to Matter Modeling.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

Error when performing dft to calculate bandgap

...
harsh's user avatar
  • 241
2 votes
0 answers
72 views

How can I call LAMMPS from a Python script multiple times in paralllel?

I'm working on a Python program that needs to call multiple LAMMPS runs and extract some computes. The code looks something like this: ...
Matheus Barbosa's user avatar
1 vote
0 answers
26 views

Problem with finding band structures, formation energy and bandgap of the crystal using Vasp

so I have a crystal now I want to perform dft on that crystal and find the energy, formation energy, bandgap and band structures. idea is to validate the generated crystals so the cif I am using is <...
harsh's user avatar
  • 241
1 vote
0 answers
12 views

From Monolayer POSCAR to Multilayer POSCAR in Python

I have monolayer POSCAR file and I want to convert it to Multilayer. For example, for 20 layers. Can anyone suggest me how to do it in Python? or if you have already written code, please share.
HPC's user avatar
  • 11
1 vote
0 answers
21 views

How would someone go about calculating the temperature change of a reaction using the enthalpies of reactants an products?

Cross-posted on Chemistry.SE. I am designing software which calculates the stoichiometric combustion temperatures of different rocket fuel and oxidizer combinations. I've been using a specific method ...
MAKS_Enjoyer's user avatar
3 votes
1 answer
32 views

RDKit PandasTools WriteSDF: RuntimeError: Bad pickle format: unexpected End-of-File while reading

I face the error: ...
M.Vu's user avatar
  • 131
3 votes
0 answers
28 views

martinize issue

PS C:\Users\MALINE\Desktop\martini> python martinize.py -f polypropylene.pdb -o output.pdb ...
068 MALINE M's user avatar
4 votes
1 answer
37 views

ASE EquationOfState error

I am running QE with ASE using Ubuntu WSL and trying to recreate simple case of calculating lattice constant (https://wiki.fysik.dtu.dk/ase/tutorials/eos/eos.html). Here is part of the code that is ...
Mateja Jovanovic's user avatar
4 votes
2 answers
144 views

Running Quantum Espresso from ASE

On my Windows Subsystem for Linux I compiled QE and I can execute simple test script from terminal. However, if I try to run QE using ASE I get the following error: ...
Mateja Jovanovic's user avatar
3 votes
1 answer
53 views

What are the specific differences between these two notations of supercell denoted by (√3×√3)R30∘ and (√3×√3)?

I am studying the super-cell structures in crystallography and came across two different notations: (√3×√3)R30∘ and (√3×√3). I would like to understand whether these two notations represent the same ...
Rubi Agrawal's user avatar
3 votes
0 answers
65 views

How to choose a proper rotation matrix and apply it to rotate unit cell about Cartesian axis to align I-Cr-I bonds parallel to Cartesian axis

I was surveying this paper Remarkably enhanced Curie temperature in monolayer CrI3 by hydrogen and oxygen adsorption: A first-principles calculations, where they have rotated the unit cell (without ...
Kratos1611's user avatar
1 vote
0 answers
39 views

How to align O-TM-O along z axis of unit cell of P2 like structure

I was surveying this article https://www.nature.com/articles/s41524-018-0117-4, here the P2 like layered oxide structure where he O-TM-O bonds are not aligned along the z-axis. As a result, VASP ...
Kratos1611's user avatar
3 votes
1 answer
57 views

How to calculate height of the center of the H2 molecule from surface via ASE?

I have XDATCAR file, i want to calculate graph of time vs height of the H2 molecule(center of the H2 molecule) from surface. ...
Rubi Agrawal's user avatar
5 votes
1 answer
198 views

problem calculating formation energy per atom using vasp

Using the below code I am trying to calculate the formation energy per atom and bandgap given the cif file. the values that are present in the material project. but I got these values which are wrong ...
harsh's user avatar
  • 241
3 votes
0 answers
66 views

Electronic density of states from not the usual VASP outputs

In a very frustrating development, my VASP has decided to hang at the writing of outputs stage. While I troubleshoot that separately, for the moment I need to get an electronic density of states from ...
Andrey Poletayev's user avatar
5 votes
0 answers
122 views

Problem with using VASP with ase on a GPU

I am a newbie using VASP, currently I am trying to calculate the formation energy per atom and pre bandgap using DFT with VASP on a GPU machine. I wrote the following script for calculating the ...
harsh's user avatar
  • 241
6 votes
0 answers
126 views

Normalization of the Smooth Overlap of Atomic Positions (SOAP) Kernel

I am using the DScribe implementation (https://singroup.github.io/dscribe/latest/tutorials/descriptors/soap.html) of the Smooth overlap of atomic positions (SOAP) ...
C_Swann22's user avatar
  • 543
2 votes
2 answers
115 views

Tool for plotting spin texture

Is there a tool that can plot a spin texture graph like these two examples below: Or does anyone know an example using matplotlib?
Gabriel Elyas's user avatar
3 votes
0 answers
57 views

Hydrogen bonding rate of relaxation on molecular dynamics

I am studying the works of Alenka Luzar on the hydrogen bonding kinetics in liquid water. Luzar defines an autocorrelation function c(t) that gives the probability that an hydrogen bond is intact at ...
horlust's user avatar
  • 303
5 votes
0 answers
36 views

How can calculate length or coordinate of any molecule in different quantum state [like (rotational quantum state)j=2] with any software or code?

How can one determine the bond length of a diatomic or tri-atomic molecule(rot. state J=3 and vib. state v=2) from its ground state bond length (x angstrom) using computational tools or programming ...
Rubi Agrawal's user avatar
5 votes
1 answer
79 views

How to convert all structure coordinates in .traj file to separate .txt files (e.g. POSCAR format files)?

I am using the ACAT code for generating the structures. ...
Rubi Agrawal's user avatar
7 votes
1 answer
258 views

Is there any software or Python library for visualizing higher-order Brillouin Zones of standard lattices?

I am looking for a software or Python library to help me visualize higher-order Brillouin Zones (BZs) of standard lattices like FCC, BCC, etc. I have already plotted the first BZ of an FCC lattice ...
Puspendu Rana's user avatar
5 votes
0 answers
17 views

Compound Bioactivity classification

I am trying to train a model to classify whether a compound is active or inactive looking at its SMILES. I have a table with 3 columns-InchiKey, SMILES, and activity-5300 rows in total -35 % of which ...
furkat's user avatar
  • 51
8 votes
3 answers
393 views

Hydrogen bonding autocorrelations

I am currently analyzing hydrogen bonding behaviour and kinetics with molecular dynamics simulations. I've been trying to compute autocorrelation functions for hydrogen bonds in a water system. Some ...
horlust's user avatar
  • 303
8 votes
5 answers
783 views

How to identify small molecules in a structure without bonds

If I have an XYZ file with a cluster of a dozen of molecules: water, $\ce{O2}$, $\ce{H2}$, $\ce{H2O2}$. A human may easily identify these molecules. But how to do it automatically? I need to identify ...
user36313's user avatar
  • 730
3 votes
0 answers
44 views

Unexpected behavior when running LAMMPS from Python

I am trying to run a series of LAMMPS input files to parameterize a system, and then using the residuals to optimize the Force Field parameters. I am able to generate the input files and run them ...
Hemanth Haridas's user avatar
2 votes
1 answer
76 views

Building Fullerenes using scikit-nano package

I am trying to use scikit-nano package to build the various isomers of fullerenes. However, none of the methods that is presented in the manual seem to work for installing the package. These are the ...
Hemanth Haridas's user avatar
5 votes
1 answer
132 views

Neural Network to predict atomic forces using SOAP descriptors

I am working on neural network in tensorflow to train a model to predict atomic forces from SOAP descriptors (regression problem). I have 64 020 data points (chemical structures), each structure has ...
jessss's user avatar
  • 73
5 votes
1 answer
84 views

How can one create various arrangements of two or more types of atoms (like O, N etc.) with distinct coverages on a metal surface?

How can I modify the procedure described in this answer to achieve adsorption of two or more types of atoms on a surface, each with distinct coverages? Is there an extension to the described method ...
Rubi Agrawal's user avatar
4 votes
0 answers
73 views

Solvation_analysis subpackage for MDAnalysis multi-atom solute

I have a simulation trajectory from DFTB+ for 1 NaNO3 in 32 H2O molecules. The trajectory is in xyz format and I converted a frame of xyz to pdb using openbabel to serve as topology input. I am ...
bhopshang's user avatar
  • 233
3 votes
0 answers
56 views

Obtaining RDF from provided structure factor

I have a test structure factor dataset from water O-O pairs and I am trying to get the $g_{OO}(r)$. ...
mykd's user avatar
  • 2,352
2 votes
1 answer
245 views

Velocity autocorrelation function for molecular dynamics trajectory

I have a 1 ns long molecular dynamics trajectory of 884 molecules of water, and I am trying to compute the velocity autocorrelation function using MDAnalysis to analyze the GROMACS output files. I ...
horlust's user avatar
  • 303
4 votes
1 answer
187 views

How to resolve ModuleNotFoundError: No module named 'pymatgen.analysis.defects'?

Background My goal is to use PyCDT: Python Charged Defect Toolkit (paper, github, pypi). I installed the code by doing: pip3 install pycdt I am not using any ...
Abdul Muhaymin -Free Palestine's user avatar
6 votes
1 answer
218 views

Speed of atom from kinetic energy of molecule

What is the velocity of each hydrogen atom in an H2 molecule, given a kinetic energy of hydrogen molecule is 0.12 eV, when expressed in angstroms per femtosecond and assuming equal velocities for both ...
Rubi Agrawal's user avatar
2 votes
1 answer
51 views

How to make initial trajectory for incident A2 molecule on any surface?

I want to write code to simulate the impingement of any molecule on a surface at different (r, theta, and phi) angles in XYZ format.
Rubi Agrawal's user avatar
3 votes
1 answer
115 views

How may I verify that my A matrix for TDA (Tamm-Dancoff Approximation of TD-DFT) from PySCF is correct?

This is a follow-up to a series of questions that I have asked here: Is a D-Wave quantum computer able to do TD-DFT calculations? (answer was "yes, but it might not be efficient") Inquiry ...
Hadeel Moustafa's user avatar
6 votes
1 answer
203 views

How to convert MoO3 bulk structure to MoO3 (010) plane surface via VESTA software?

Convert MoO3 bulk structure to MoO3 (010) plane surface via VESTA
Rubi Agrawal's user avatar
5 votes
1 answer
65 views

A matrix form used in the Quantum Annealer Eigensolver (QAE)

In the paper "Computing molecular excited states on a D‑Wave quantum annealer", PySCF is employed to compute the TDA matrix. Then a few of the lowest eigenvalues and eigenvectors of a TDA ...
Hadeel Moustafa's user avatar
5 votes
2 answers
190 views

ASE: How to plot the irreducible Brillouin zone and this bandpath from a bandpath object

I am using ASE (Atomic Simulation Environment) for theoretical chemistry and I see an option to plot the irreducible Brillouin zone and this bandpath but I can't figure out how. I'm not a programmer. ...
Samaray's user avatar
  • 61
4 votes
1 answer
252 views

Random velocity generation

How to generate random velocities in the geometry coordinates of a surface (POSCAR file) using the Boltzmann distribution law with Atomic Simulation Environment (ASE) or other codes for Molecular ...
Rubi Agrawal's user avatar
2 votes
1 answer
50 views

Non-Equivalent T-Sites from a cif file

I am trying to find symmetrically inequivalent T-atoms in a crystal structure (zeolite). Does anyone happen to know any package that can help with that? I see that pymatgen does have options for ...
Saha_1994's user avatar
  • 989
5 votes
1 answer
208 views

Plot MSD (mean square displacement) versus time for a polymer chain

Cross-posted on Computational Science SE. The following are the movements of the center of mass of a polymer chain over time in a monte carlo simulation. ...
user366312's user avatar
  • 2,566
3 votes
1 answer
197 views

Print full stress tensor in ASE to calculate Green Kubo viscosity

I would like to print out the off diagonal components of the full stress tensor in ASE. The goal is then to calculate the Green Kubo viscosity. One should use the ensemble average of the off diagonal ...
Marco Di Gennaro's user avatar
3 votes
0 answers
341 views

Read and run lammps water model in ASE

I want to read a lammps data file in ASE, for instance the TIP3P or the SPC model. The lammps examples provide the input script and the data file, which work perfectly. ASE is not able to read the <...
Marco Di Gennaro's user avatar
3 votes
0 answers
84 views

Using GPyTorch for GPR together with the SOAP-Kernel

My goal is to use a Gaussian Process Regression (GPR) model with the GPyTorch library with the SOAP (smooth overlap of atomic positions) descriptor that can be obtained with the DScribe library. I ...
C_Swann22's user avatar
  • 543
4 votes
1 answer
209 views

What is the best way to save a psi4 molecule object in Python?

what is the best way to save and load a psi4 molecule? I tried pickle/dill but they both failed. I see a feature to save as xyz, but I'm not seeing a function to load as xyz and I'm not sure if save ...
Frank's user avatar
  • 195
5 votes
1 answer
145 views

Evaluating analytic gradients for overlap integrals

I have been working on a toy HF code for some time. From this reference I am trying to work out an analytic expression for the first derivatives of overlap integrals. The original expression for ...
Hemanth Haridas's user avatar
9 votes
0 answers
117 views

How does the line search in geometry optimisations work?

I am trying to write a Newton-Raphson geometry optimisation script in python (Current version of my code) using the energy, gradient and Hessian from Gaussian 16. In order to reach a minimum, I would ...
evd's user avatar
  • 91
5 votes
1 answer
387 views

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

Rephrasing the above, what is the content of the data in the CHGCAR file? Is the data part shown below representative of the electron-charge density or is it the actual charge in the system and I have ...
Pranoy Ray's user avatar
  • 1,637
4 votes
1 answer
120 views

How to get displacements along VASP NEB trajectory?

I am performing an NEB calculation with VASP and VTST. I would like to visualize the atoms along the path and to calculate their displacements. When I have a single relaxation's XDATCAR, I can unwrap ...
kpoint's user avatar
  • 159

1
2 3 4 5