linux-cpp-lisp / sitator Goto Github PK
View Code? Open in Web Editor NEWUnsupervised landmark analysis for jump detection in molecular dynamics simulations.
Home Page: https://doi.org/10.1103/PhysRevMaterials.3.055404
License: MIT License
Unsupervised landmark analysis for jump detection in molecular dynamics simulations.
Home Page: https://doi.org/10.1103/PhysRevMaterials.3.055404
License: MIT License
It takes quite a long time to read and transfrom the 'trajectory.xyz' file. I would suggest to use the method provided by pymatgen/ase, which is faster. The code example is shown below:
from ase.io import read, write
import numpy as np
from pymatgen.io.ase import AseAtomsAdaptor
from ase import Atoms
from pymatgen.io.lammps.outputs import parse_lammps_dumps
confs = parse_lammps_dumps('trajectory.xyz') # this is a generator
symbols = ['La'] *24 +['Zr'] * 16 + ['O'] *96 + ['Li']*56
ats = [Atoms(symbols=symbols, positions=conf.data.values[:, :3],
cell=conf.box.to_lattice().matrix, pbc=True) for conf in confs]
write('LLZO.xyz', ats)
ats = read('LLZO.xyz', ':100')
Besides, I suggest to rename the 'trajectory.xyz' as 'dump.trajectory'. For it is more like a lammps-dump output rather than '.xyz' type file. Because '.xyz' hints the user to use ase.io.read to load the data.
The jupyter notebook example use the package samos but I cannot find it. Is that an personal package?
The notebook got errors when running landmark analysis. I found that it is due to PBCCalculator. The PBCCalculator require an np.array like input. When running the code, it reports an error that the input is atoms.cell.
I guess this is due to the change of ase
package. So I change all PBCCalculator(atoms.cell)
to PBCCalculator(atoms.cell.array)
in the 'sitator' package and the error is fixed.
An example is shown below:
line 91 in util/zeo.py: real_pbcc = PBCCalculator(structure.cell)
update -> real_pbcc = PBCCalculator(structure.cell.array)
After installing the package using pip install ".[SiteTypeAnalysis]"
, I get the following error:
Traceback (most recent call last):
File "", line 1, in
File "/home/azeeshan/install/miniconda2/envs/pymatgen2-env/lib/python2.7/site-packages/sitator/init.py", line 2, in
from SiteNetwork import SiteNetwork
File "/home/azeeshan/install/miniconda2/envs/pymatgen2-env/lib/python2.7/site-packages/sitator/SiteNetwork.py", line 15, in
from sitator.visualization import SiteNetworkPlotter
ImportError: No module named visualization
I checked my /home/azeeshan/install/miniconda2/envs/pymatgen2-env/lib/python2.7/site-packages/sitator/
directory and found that indeed there was no directory named visualization
. There are util
and landmark
directories though. Maybe something to do with setup.py
or __init__.py
?
Hi, when I try to open the shared link to Jupyter notebooks for conducting full landmark analyses of LiAlSiO4 and Li12La3Zr2O12 as in our paper, it shows the page could not be found, would you check that?
Thanks
With python3.5 or python3.6, and ase==3.19.3 or 3.20.1, when calling the PBCCalculator:
PBCCalculator(atoms.cell)
the following error occurs:
File "sitator/util/PBCCalculator.pyx", line 31, in sitator.util.PBCCalculator.PBCCalculator.__init__ File "stringsource", line 658, in View.MemoryView.memoryview_cwrapper File "stringsource", line 349, in View.MemoryView.memoryview.__cinit__ TypeError: a bytes-like object is required, not 'Cell'
I suspect this is some special case of how an ase.Cell is treated.
Replacing the call with
PBCCalculator(atoms.cell[:])
alleviates this issue. There are however many calls to PBCCalculator in the sitator package, so there might be a different solution to this problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.