Giter Club home page Giter Club logo

sitator's People

Contributors

lekah avatar linux-cpp-lisp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sitator's Issues

Suggestion for read and transform trajectory

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.

No `samos` package

The jupyter notebook example use the package samos but I cannot find it. Is that an personal package?

Error with `PBCCalculator`

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)

ImportError: No module named visualization

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?

The lost example information

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

PBCCalculator fails on instantiation with Atoms.cell

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.