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
1 vote
0 answers
11 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
50 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
116 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
  • 223
3 votes
0 answers
34 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
67 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
  • 223
6 votes
0 answers
118 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
  • 533
2 votes
2 answers
63 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
55 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
  • 163
5 votes
0 answers
31 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
67 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
235 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
16 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
329 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
  • 163
8 votes
5 answers
754 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
39 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
71 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
116 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
77 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
72 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
37 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,342
2 votes
1 answer
127 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
  • 163
4 votes
1 answer
101 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
192 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
49 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
102 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
183 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
57 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
128 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
212 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
47 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
  • 969
5 votes
1 answer
136 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,546
3 votes
1 answer
155 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
203 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
74 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
  • 533
4 votes
1 answer
154 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
142 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
114 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
235 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,635
4 votes
1 answer
101 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
  • 139
3 votes
1 answer
136 views

Verifying periodicity of crystalline orbital modulus in PySCF

I'm trying to verify that the modulus of the crystalline atomic/molecular orbitals computed by PySCF satisfy the correct periodicity condition for the supercell. I'm considering a hydrogen chain ...
phonon's user avatar
  • 61
4 votes
0 answers
74 views

Issue with py4vasp and Jupyter Lab Integration on Windows 10?

I am currently working on a project involving py4vasp for crystal structure analysis. I have successfully installed py4vasp, Jupyter Lab, and Jupyter Notebook in a Conda environment. When I attempt to ...
Trivaani Yadav's user avatar
10 votes
3 answers
634 views

Tool to extract rings from zeolite structures

I am trying to reproduce the work done in this paper https://doi.org/10.1021/acscatal.7b00588. In this direction, I have been successful in optimizing the unit cells of the zeolites. For further steps,...
ansonthms's user avatar
  • 981
3 votes
1 answer
228 views

Transform Supercell to Unitcell

I’ve supercells of around 10,000 Metal–organic frameworks (MOF) structures in CIF format. I’m looking to convert them to unit cells. But I’m not able to find packages (or any other libraries like ...
hari's user avatar
  • 83
4 votes
1 answer
143 views

Python code for combining two surfaces to form an interface

I have two surfaces named POSCAR1 and POSCAR2. I want to stack the surface of POSCAR2 on POSCAR1 to form an interface and also to match their lattice constants. I tried a solution here by adding it ...
Nana Kofi Boakye's user avatar
2 votes
0 answers
206 views

How to fit Smooth Overlap of Atomic Positions (SOAP) into Kernel Ridge Regression (KRR)?

I have a dataset of 64 chemical structures and their calculated energies, which I want to predict using machine learning. I need to use SOAP as a descriptor so that each structure would be an ...
jessss's user avatar
  • 73
6 votes
1 answer
406 views

Persistent errors in single equilibrium calculations (Thermo-Calc)

When running single point equilibrium calculations on an array of compositions I come across some compositions (for specific examples see below) that return the error ...
sgp45's user avatar
  • 632
6 votes
1 answer
94 views

How to address 'saveGraphic: Method not found' error in automating the generation of figures in avogadro using Python?

My question is a follow-up question to this question posted by Hemanth Haridas. I ran the example .py script in Geoff Hutchison's answer for the above mentioned question to generate .png files from ....
Aimun Jawed's user avatar
4 votes
2 answers
144 views

How to Create a 2D Structure of Boron (Brophene) using ASE?

Unlike Graphene and MoS2, For borophene, I didn't find any inbuilt function in ASE. I have tried to make it, but i failed. So If anyone could help me, it will be great help. Since brophene has ...
Akshit Dhillon's user avatar
6 votes
2 answers
128 views

Is there any Python library for returning the atoms of a periodic material within a cube?

Is there any Python package that allows to cut defined by the points (0, 0, 0) and (x, y, z)? That is, it should return all the atoms of the unit cell and periodic images inside the shaded region. (...
ado sar's user avatar
  • 211
4 votes
1 answer
185 views

How to change color of bands in PyProcar?

I am using Pyprocar to plot my band structure. However I cannot change color even modified the 'color' parameter. I tried to change color of their examples referred to Fe band structure but did not ...
Tieyuan Bian's user avatar

1
2 3 4 5