13

Assuming you have an atoms object, all you need to do is call the "write" function. from ase import Atoms supercell = Atoms() supercell.write("supercell.xyz")


12

iRASPA fast & beautiful visualization of porous materials (but not only) Features according to https://iraspa.org/iraspa/ structure creation and editing, creating high-quality pictures and movies, Ambient occlusion and high-dynamic range rendering, collage of structures, (transparent) adsorption surfaces, text-annotation, cell replicas and supercells, ...


11

That is a modification of the standard XYZ file format and is called extended XYZ format, and not all programs are compatible with it. From the VMD Molfile Plugin Documentation page, it looks that VMD is only compatible with standard XYZ format. Also, take a look at this answer (to another question) about adding PBC info in VMD after loading standard XYZ ...


11

Crystal Impact Diamond Crystal Impact Diamond, despite being a commercial product, offers a free demo-version. One can import a structure, adjust its appearance and use screen capturing software for saving the image/animation. Import of the following files is supported: DIAMDOC, DSF, EDF, DS1, CFG, CIF, CRY, CSD, DAT, PDB, ENT, INS, RES, DAT, IDF, KPL, XYZ, ...


10

VESTA You can try VESTA. It is good, lightweight and works on Windows and Linux platforms. It is good for viewing and production level image quality manipulation. https://jp-minerals.org/vesta/en/download.html


8

The following code should create a Cu surface and sort it by z index. We do this by providing tags for the positions of the atoms. [:, 2] allows us to select the z position of all atoms. from ase.build import bulk, surface from ase.build.tools import sort Cu = ase.build.bulk('Cu', 'fcc', a=3.6, cubic=True) surface = ase.build.surface(Cu, (1,1,1), 4, ...


8

UnityMol Conceived with biological systems in mind, but relevant for any molecular system Modern interface: recent and still under active development Supported formats: PDB, mmCIF, GRO, Mol2, XYZ and SDF files, OpenDX potential maps, XTC trajectory files Important number of representation formats and coloring/rendering options VR (Virtual Reality) support (...


8

MoleView Super lightweight Developed based on standard plotting library (Matplotlib) Very easy to install pip install moleview All-in-one command moleview your_file.xyz More info: https://github.com/moleview/moleview


8

The PBC attribute in ASE is used for: finding nearest neighbours input for calculators that may use that information (dftd3, dmol, etc.) creation of surfaces finding the Bravais lattice certain constraints certain optimization strategies Nothing is per se changed in the object. But much of the functionality of ASE depends on that attribute. If you are ...


7

Here is a more concise way of doing the same thing. from ase.io import read bec = read("bec_replaced.vasp").write("bec_replaced.xyz") It is not needed to import ase and import the functions, you want to do one or the other (This is a python thing not ASE). read also returns an atoms object with a write function built in, so there is no ...


7

Beautiful Atoms Beautiful Atoms is a Python package for editing and rendering atoms and molecules objects using Blender. A Python interface that allows for automating workflows. Features: Model: space-filling, ball-stick, polyhedral, cavity and so on. Support file: cif, xyz, cube, pdb, json, VASP-out and so on. Support structure from ASE and Pymatgen ...


7

Reading coordinates from a file is a very simple task with ASE. The following code reads the three different file types into an Atoms object: from ase import io lammps = io.read('mos2.pos',format='lammps-data') cif = io.read('mos2.cif') xyz = io.read('mos2.xyz') ASE can detect certain file formats from the ending, like in the case of .cif and .xyz. For the ...


7

As far as I understand, this warning can be safely ignored. While parsing a cif structure, the get_spacegroup() function in the cif parser of ASE, checks whether the space group evaluated by ASE is consistent with the cell symmetry mentioned in the cif file. The relevant part of the function is shown below: if setting_name: no = Spacegroup(...


6

I don't know if this is exactly what you want to do, but pymatgen may be able to help (disclosure, I am a developer of this package). See this example code below for your example input file: from pymatgen.core.structure import Structure, Molecule from pymatgen.analysis.graphs import StructureGraph from pymatgen.analysis.local_env import JmolNN # load the ...


6

Camps is correct, VMD cannot directly parse the comment line of an xyz file because the extended ASE format is not recognized. You can, however, use a tcl-script to load the file and parse the comment line yourself. I am no tcl expert but here is an example that works for me: set filename [lindex $argv 0] # load the coordinates into vmd mol new $...


6

You likely need to ensure the correct anaconda environment is loaded. Use the following to get a 2.7 environment. conda create --name py2 python=2.7 conda activate 2.7 pip install ase==3.12.0 Your problems probably stem from issues with pip or the location of the installation. Use this method to ensure you have your 2.7 environment and you have ase in it. ...


6

I hope it's okay to "self-answer". So I also posted this question in the GPAW mailing list and one of the users in the mailing list who go by the handle mazay0 offered a different means of installing gpaw as follows: !apt install python3-mpi4py cython3 libxc-dev gpaw-data !pip -q install gpaw pymatgen==2019.12.22 This one worked. Although, I still ...


5

As described in the documentation, the a, b, and c vectors passed into ase.build.cut define lines that make up your cell. To see that the vectors you passed in give a (111) surface, consider the third vector c, which when it is not explicitly passed in, is formed using $\vec{c}=\vec{a} \times \vec{b}$. $\vec{c}$ is then the normal vector to plane formed by $\...


5

You should do something like this instead: import ase from ase.io import read, write bec = ase.io.read("bec_replaced.vasp") bec_new = ase.io.write("bec_replaced.xyz", bec, format="xyz") according to the documentation page.


5

This should work, basically, one needs to put iterable of atoms as images. So, using the trajectory reader should do the trick. import ase from ase.io import read, write from ase.io.vasp import write_vasp_xdatcar from ase.io.trajectory import Trajectory bec = Trajectory("./run10/local_minima.traj") bec_new_xdat = ase.io.vasp.write_vasp_xdatcar(&...


4

Sticking with ase you can use the built-in get_distance function. It supports non-orthogonal unit cells. An example to get the distance between atom number a and atom number b is: import ase.io atom = ase.io.read('your_file.xyz') distance_a_to_b = atom.get_distance(a, b) Additionally if you want to compute the Radial Distribution Function (RDF) and ...


3

Have you tried using the Ovito where there are built in functions to evaluate both RDF and CN of a system? Additionally, it might be possible to use Vesta to convert the unit cell to a rectangular one (see this video). That way you can use your code to do the analysis.


3

ASE is not aware of which layer things are on when you use the surface function to build an arbitrary surface. However, the indices should be in order of z height I believe. You can use the following to assign the tags, just be aware that this will not work for more complex surfaces very well (which is why it is not done by default I believe). slab = ...


3

ASE should be able to read forces from the additional columns. Here is an example of an .xyz file which contains forces. 2 Lattice="6.0 0.0 0.0 0.0 6.0 0.0 0.0 0.0 6.0" Properties=species:S:1:pos:R:3:forces:R:3:magmoms:R:1 energy=-6.801137982077364 dipole="-1.3543798178593251e-15 -1.5609399349163789e-15 6.566746345129899e-16" magmom=0.0 ...


3

For an atom in the boundary, the distance with all other atoms of the molecule it is part of will be different based on whether we take into account minimum image convention (MIC) or not. Thus we can, first identify the indices of all the molecules in the structure and then exclude the molecules for which any of the distance is different if MIC is ...


3

ASE can be used to achieve what you require. Basically we need to: Read the structure. Determine the molecules using neighborlist class in ASE. Sort each of the molecules in the required manner using ase.build.sort. The following code does this: import numpy as np from ase.io import read, write from ase import Atoms, neighborlist from ase.build import sort ...


3

PyMOL Molecular visualization system built on top of a python backend that can be used for scripting Powerful and flexible interface with GUI and command line options Conceived with biological systems in mind, but relevant for any molecular system Commercial product, but built on an open-source foundation and available for free for Educational-Use-Only ...


Only top voted, non community-wiki answers of a minimum length are eligible