# Tag Info

Accepted

### How can I use a GUI on a supercomputer?

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 ...
• 28.8k

### How to start a Machine Learning project for chemical properties prediction?

Admittedly, there are tons of materials on the chemistry + machine learning topics. Let me give one: An introductory text I find useful is Machine Learning in Chemistry from Janet and Kulik in ACS in ...
• 1,648

### How can I use a GUI on a supercomputer?

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 ...
• 2,516

### Is there a way to do array broadcasting faster, or without using loops?

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: ...
• 28.8k

### Is there a way to do array broadcasting faster, or without using loops?

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 ...
• 556

### Is there a way to do array broadcasting faster, or without using loops?

Just adding some timings for @Antimon's answer. Using numpy.outer is definitely the way to go IMO. ...
• 171

### Is there a way to do array broadcasting faster, or without using loops?

You can use dot multiplication to achieve this: ...
• 28.8k

### How to make a python code that can read a .xyz file and find the distance between atoms?

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 ...
• 71

### Numerically integrating the Hartree potential

Based on your clarifications starting here, I see that you are starting with the simple case in which $n(r^\prime) = 1$. In this case we have the integral: \tag{1} \int \frac{1}{|r-r^\prime|}\textrm{...
• 28.8k
Accepted

### How to read QE's wfc*.dat files with python

With python, you can open a binary file using the 'rb' option in your open statement. Then using ...
• 86

### How to input 3D coordinates from xyz file and connectivity from SMILES in rdkit?

Your best bet is to keep the molecule (e.g., as a .mol or .sdf file) around and then simply update the coordinates from the <...
• 7,778
Accepted

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

I know this was long ago, but for those that find the same problem in the future, the sisl python package might be useful. It has a generic ...
• 396
Accepted

### How is the atom selection going wrong when creating the collective variable?

I can't tell why you're getting that specific difference, but most likely it's related to the fact that the CV is using global variables. It's possible that something changed in those globals. OPS CVs ...
• 1,887

### Is there a more efficient hard sphere packing algorithm?

Using the Lubachevsky-Stillinger algorithm is the best choice. You get up to 64% space filling for a random monodisperse sphere packing. Another classical study is the algorithm by Jodrey and Tory (...
• 161
Accepted

### How to solve this Phonopy-related problem?

This is basic bash-script which will be quite useful, just start with scratch ...
• 3,239
Accepted

### Convert SMILES format to Amino Acid masses using RDKit - Cyclopeptides

I'm not sure if it's improper to answer my own question, but I think I've cracked it. For each peptide bond match identified by GetSubstructMatches the index [1] is ...
• 111

### How can I use a GUI on a supercomputer?

To address your specific question: No, you don't always have to download everything locally. VASP creates a lot of different output files and sometimes (most of the times?) you only need some of those....
• 373

### Node features matrix with Networkx

You can get a list of lists of the node features like this: g = mol_to_nx(Chem.MolFromSmiles('CCC')) [list(g.nodes[n].values()) for n in range(g.number_of_nodes())] ...
• 733

...
• 321

### How to plot a Gaussian cube file with python/matplotlib?

The Python package mayavi uses VTK for 3D visualization and offers thus several poptions for plotting volumetric data. ase has an interface to mayavi and facilitates IO of electronic structure grid ...
• 316

### How to edit the first line of XYZ file?

You could do this by just modifying the first line of the file. But here are some more general purpose utilities you could use (note it requires the re module) <...
• 7,784

### How to transform fractional coordinates into cartesian?

If I understand correctly your question, you have the fractional coordinates of the atoms in the unit cell, and (I'm assuming) that you also have the unitcell (or supercell) vectors. In this case the ...
• 513

### How to input 3D coordinates from xyz file and connectivity from SMILES in rdkit?

The representation of a molecular structure as SMILES string is a (very) reduced one, often with only implicit hydrogen atoms. Recreating a 3D molecular structure with either OpenBabel or RDKit not ...
• 1,459

### How to find Young's Modulus using stress strain curve using Python?

Unfortunately, due to my reputation, I cannot comment yet. However, to the surprise of Tyberius, I would like to note that the function young_modulus does not return the Young's modulus, but the ...
• 51
Accepted

### BoltzTraP script works with which python version?

To summarize the discussion from the comments/chat, the errors you are seeing are likely due trying to run BoltzTraP using Python3.9 when it is a Python2 program. I imagine some of these errors can be ...

### How to compute the synthetic accessibility score in Python?

Ertl and Schuffenhauer, who developed the synthetic accessibility score, provide an implementation packaged with RDKit called sascorer.py. This is provided in the Contrib folder of the RDKit repo; ...
• 14.1k
Accepted

### How to compute the overlap matrix in Python

Here is an updated version of your code that I believe now works. I had to add in a few of the values that were computed elsewhere in your code, but otherwise it is mostly the same. ...
• 14.1k

### How to generate the high symmetry paths for band structure calculations?

Here are a couple of extra links that might be helpful in your (now 5months old) quest: [1], [2]. It would be helpful for all of us if you could put up that green chekmarck on the answers you found ...
• 1,256
Accepted

### How to read data from an input and form two-electrons integral?

I'm not sure how your current code is supposed to work. Focusing just on the first half: ...
• 14.1k