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
26
votes
3answers
2k views

How to “get my feet wet” in Density Functional Theory by simulating a water molecule using Python

I just saw I am a beginner in Density Functional Theory. What are some resources that could help me to learn the basics? and it reminded me that few years ago I'd asked How can I calculate the charge ...
19
votes
0answers
249 views

What are the tools available for point defects calculations?

As far as I know, there are mainly PyCDT, PyDEF, pylada and some part of pymatgen. As a new user to those tools, which one would be a good choice? It would be appreciated if you could explain one of ...
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.
11
votes
1answer
121 views

How to get order constitution data for single equilibrium calculation in Thermo-Calc's TC Python module?

I know that it is possible to get order constitution data for phases when using Thermo-Calc's GUI (e.g. to get "BCC_B2 DISORD" instead of just "BCC_B2") for a single equilibrium ...
10
votes
2answers
631 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 ...
26
votes
4answers
3k 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 ...
29
votes
2answers
656 views

How is Julia used in matter modeling?

What are the main uses and applications of Julia in matter modeling? Python for example is used in many codes, not to mention workflow automation and data processing. Are there any available codes or ...
12
votes
3answers
369 views

How to create a 3D band structure from DFT band structure calculation?

How can I create such a 3D plot using matplotlib? Like the one in Figure (a) below: I want to create it using DFT bandstructure calculation result
10
votes
1answer
151 views

How should I generate a radial distribution function (RDF) for an MD trajectory with python?

I am attempting to analyse the radial distribution function (oxygen to oxygen) for a ~400ps simulation on a droplet of water (MD done with NAMD). I am using the python library MDAnalysis to do this. ...
6
votes
1answer
58 views

How to obtain electron charge density per unit volume about a water molecule using SlowQuant?

@Nike Dattani's answer to How to “get my feet wet” in Density Functional Theory by simulating a water molecule using Python recommends SlowQuant. I've used the install instructions for Linux on my ...
12
votes
1answer
120 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 ...
7
votes
1answer
78 views

Normalization condition in evaluating the radial distribution function for a hard-spheres system

I am trying to simulate a 3D hard-spheres in a box system in python. The idea behind this is that I have to create a system in a 1-by-1-by-1 box with periodic boundary conditions and with $N = 500$ ...
4
votes
1answer
79 views

How to process electron-density data from a CHGCAR for better handling?

We all know that Vesta helps us visualize the electron clouds present in the CHGCAR data, but I am looking for a better way to process the electron-density data we get in a CHGCAR file for compact ...