Questions tagged [python]

For questions about materials modeling scripts written in the Python programming language. Questions should focus on interfacing with existing packages and aspects related to modeling, not general debugging.

Filter by
Sorted by
Tagged with
7
votes
1answer
207 views

How to understand the wavefunction outputed by QE with HDF5 format?

Following the answer to my question: What is the best program to manipulate numerical DFT wavefunctions to calculate custom matrix elements?, I compiled Quantum ESPRESSO with the hdf5 flag on, and now ...
12
votes
1answer
143 views

What is the best program to manipulate numerical DFT wavefunctions to calculate custom matrix elements?

For pedagogical reasons, I am looking for ways to calculate quantum-mechanical quantities such as $\langle m | \dot{m}\rangle, \langle m | \dot{n}\rangle, \langle m | \ddot{n}\rangle$ using ...
9
votes
1answer
301 views

Using OpenBabel or RDKIT Python API to generate conformers from a SMILES string

I have a bunch of monomers in the form of SMILES string and I want to generate conformers from them. At the moment, I am using RDKit to convert these SMILES strings to .sdf files, then using ...
7
votes
1answer
143 views

How to build the [111] slab model of NiSe2 with different terminations with ASE tool?

The following figure is the bulk structure of NiSe$_2$ downloaded from the materials project database. Now I want to study the properties of its [111] plane. In detial, I cut the slab with atomic ...
12
votes
1answer
372 views

Is there a more efficient hard sphere packing algorithm?

I am trying to pack hard-spheres in a unit cubical box, such that these spheres cannot overlap on each other. This is being done in Python. I am given some packing fraction ...
34
votes
13answers
2k views

What is a good programming language for matter modeling?

What is a good programming language for matter (e.g. molecular or materials) modeling? Since this is a broad field, I don't expect there to be only one answer.
10
votes
1answer
228 views

Generating SOAP descriptors in python

What is the best python package to construct Smooth Overlap of Atomic Positions (SOAP) descriptors given SMILES representation of a molecule? Is this even possible without providing 3D geometry? An ...
16
votes
1answer
223 views

How to calculate t-zero temperature using Thermo-Calc- Python (TCPython) for multiple alloys?

T-zero temperature is the temperature at which the Gibbs energies of two phases are equal. Here, I wish to find the temperature at which FCC and BCC have same Gibbs energy. Thermo-Calc console mode ...
9
votes
3answers
803 views

Molecular visualization software in Jupyter (IPython) Notebooks

Jupyter notebooks have always been a great way for me to create high-quality graphs, and write code. The features also continue to improve with packages such as Jupyter Lab, and now Jupyter Books, ...
27
votes
4answers
4k views

How to write my own density functional theory (DFT) code in Python?

I am a DFT user and at some point in the future, I would like to write my own DFT code in Python to help gain a deeper understanding of DFT. As mentioned in a previous answer people have written their ...
9
votes
2answers
68 views

Evaluating the MSD of my simulation

I am running a molecular dynamics simulation of water in TIP3P, and I am storing the positions of my particles in a 2D array called relevant_positions. The number ...
10
votes
2answers
704 views

RDkit: While converting a *.sdf file to fingerprint, I'm facing several errors

suppl = Chem.SDMolSupplier('1.sdf') for mol in suppl: if mol is None: continue # print(mol.GetNumAtoms()) fps = [Chem.RDKFingerprint(x) for x in supply] I am ...
9
votes
0answers
287 views

I wrote a Python code to do MD for a Lennard-Jones fluid but the VACF is wrong: What might be the problem? [closed]

I am trying to write a molecular dynamics simulation for a Lennard-Jones fluid in a box with periodic boundary conditions. The box has no net momentum. I am writing this in python. I have written a ...

1
2