!JEiuNJLuxedbohAOuH:matrix.org

ASE

189 Members
Atomic Simulation Environment — https://wiki.fysik.dtu.dk/ase/ — Channel for discussions, support, and development of ASE3 Servers

Load older messages


SenderMessageTime
5 Apr 2024
@nw18rica:matrix.tu-darmstadt.deNils Phillip Winkelmann (TUDa)Is there a function to find an Atoms object via coordinates instead of the identifier in the atoms list? I cant find one, but i think there should be one. surely i could write it myself i just hoped for better performance if its already implemented.13:25:48
@nw18rica:matrix.tu-darmstadt.deNils Phillip Winkelmann (TUDa)furthermore is there a way to get auto completion working (I am using PyCharm) but auto completion doesnt work for ase objects 13:31:31
@mjwaters:matrix.orgmjwaters
In reply to @nw18rica:matrix.tu-darmstadt.de
Is there a function to find an Atoms object via coordinates instead of the identifier in the atoms list? I cant find one, but i think there should be one.
surely i could write it myself i just hoped for better performance if its already implemented.
You can do this in a few simple lines of code but it probably won't scale well to large systems.
16:32:53
@mjwaters:matrix.orgmjwatersMy gosh, I got so busy. let me get some code snippets22:31:18
@mjwaters:matrix.orgmjwaters
In reply to @nw18rica:matrix.tu-darmstadt.de
furthermore is there a way to get auto completion working (I am using PyCharm) but auto completion doesnt work for ase objects
from ase.geometry import find_mic

def nearest_atom_index(atoms, position):
  disp_vec = atoms.get_positions() - position
  disp_vec_mic, disp_vec_mic_mag = find_mic(disp_vec, atoms.cell)
  nearest_atom_index = np.argsort(disp_vec_mic_mag)[0]
  return nearest_atom_index

22:37:33
@mjwaters:matrix.orgmjwaters
In reply to @nw18rica:matrix.tu-darmstadt.de
furthermore is there a way to get auto completion working (I am using PyCharm) but auto completion doesnt work for ase objects
*
import numpy as np
from ase.geometry import find_mic

def nearest_atom_index(atoms, position):
  disp_vec = atoms.get_positions() - position
  disp_vec_mic, disp_vec_mic_mag = find_mic(disp_vec, atoms.cell)
  nearest_atom_index = np.argsort(disp_vec_mic_mag)[0]
  return nearest_atom_index

22:37:55
@mjwaters:matrix.orgmjwaters It's basically what I use, so didn't test it. There might be a typo. 22:39:24
@mjwaters:matrix.orgmjwatersI have a question for people that have experience with high-throughput work, how do you automate picking band paths for your band structures? 22:40:52
@mjwaters:matrix.orgmjwaters Andrew Rosen: This seems like something you'd have opinions on. 22:41:12
@mjwaters:matrix.orgmjwatersI've been surveying the methods available, and am a bit dismayed at how little they agree with each other. 22:42:04
@arosen:matrix.orgAndrew Rosen
In reply to @mjwaters:matrix.org
I have a question for people that have experience with high-throughput work, how do you automate picking band paths for your band structures?

I generally recommend using the band path algorithm my Munro and Latimer: https://www.nature.com/articles/s41524-020-00383-7.

If I am allowed to speak the devil's name here: https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.bandstructure.HighSymmKpath

22:46:27
@arosen:matrix.orgAndrew Rosen
In reply to @mjwaters:matrix.org
I have a question for people that have experience with high-throughput work, how do you automate picking band paths for your band structures?
*

I generally recommend using the band path algorithm by Munro and Latimer: https://www.nature.com/articles/s41524-020-00383-7.

If I am allowed to speak the devil's name here: https://pymatgen.org/pymatgen.symmetry.html#pymatgen.symmetry.bandstructure.HighSymmKpath

22:47:13
@mjwaters:matrix.orgmjwatersokay yep, 22:48:31
@mjwaters:matrix.orgmjwatersbeen reading bit of that paper. 22:48:44
@arosen:matrix.orgAndrew RosenI am not an expert on symmetry, so I am mostly just relying on my trust of the co-authors here22:49:01
@mjwaters:matrix.orgmjwatersany thoughts on high-symmetry point label conventions?22:49:08
@arosen:matrix.orgAndrew Rosennope!22:49:13
@mjwaters:matrix.orgmjwatersokay, I'm going to show the graduate students how to plot band paths with ASE. This has really been the takeaway from this weeks bandpath automation clusterf*** 22:50:29
@mjwaters:matrix.orgmjwatersplot your band path on BZ, it's a great double check. 22:51:04
@mjwaters:matrix.orgmjwatersThe worst part is that usually when I'm behind on something for my collaborators, It's because I was working on something cool or useful for the future. I feel like I've mostly made negative progress by opening this can of worms. 22:53:26
@mjwaters:matrix.orgmjwaters Random question, is there flag or existing function to make the output from atoms.todict() compatible with the json.dump() ? json.dump() won't take the numpy arrays unless they get converted to lists. 23:11:06
6 Apr 2024
@tomdmre:matrix.orgTomD Can someone who knows a little bit how the doc works look at https://gitlab.com/ase/ase/-/merge_requests/3265 ? pipelines are failing. 12:00:44
@tomdmre:matrix.orgTomD5 minutes away from a brand new espresso documentation!12:00:58
7 Apr 2024
@askhl:matrix.orgAsk Hjorth Larsen

mjwaters: json.dump(..., default=<function which converts objects into something the base JSON encoder understands>)

ase.io.jsonio provides an implementation of that, which is what todict() is for. That's really what todict() is for, although it could conceivably be made to work with other encoders than JSON.

23:47:34
@askhl:matrix.orgAsk Hjorth Larsen It would not be productive to make todict() implementations call todict() on all the sub-objects; the JSON module's own design is the best one, since it makes sure that control is passed to the toplevel encoder which keeps all the todict() implementations more clean. 23:49:00
@askhl:matrix.orgAsk Hjorth Larsen * (It would not be productive to make todict() implementations call todict() on all the sub-objects; the JSON module's own design is the best one, since it makes sure that control is passed to the toplevel encoder which keeps all the todict() implementations more clean.) 23:49:09
@askhl:matrix.orgAsk Hjorth Larsen TomD: I am not an expert in sphinx, but it seems to me that something in the documentation already documents the function, and now you're documenting the function again. I'd grep for where write_espresso_in() might be documented to look for a possible conflicting definition 23:51:23
@askhl:matrix.orgAsk Hjorth Larsen *

mjwaters: json.dump(..., default=<function which converts objects into something the base JSON encoder understands>)

ase.io.jsonio provides an implementation of that, which is what todict() is for. That's really the only thing todict() is for, although it could conceivably be made to work with other encoders than JSON.

23:54:36
8 Apr 2024
@sebastianecheverrir:matrix.org@sebastianecheverrir:matrix.org
In reply to @askhl:matrix.org
    opt = FIRE2(a,
                dt=0.1,
                maxstep=0.2,
                dtmax=1.0,
                Nmin=20,
                finc=1.1,
                fdec=0.5,
                astart=0.25,
                fa=0.99)
    opt.run(fmax=0.001)
    e1 = a.get_potential_energy()
    n1 = opt.nsteps

    a = system_setup()

    reset_history = []

    def callback(a, r, e, e_last):
        reset_history.append([e - e_last])

    opt = FIRE2(a,
                dt=0.1,
                maxstep=0.2,
                dtmax=1.0,
                Nmin=20,
                finc=1.1,
                fdec=0.5,
                astart=0.25,
                fa=0.99,
                abc=True,
                position_reset_callback=callback)

Here (for example) there are two calls to FIRE2. Many of the parameters are the same. What about:

def new_fire2(arg1, arg2):
    return FIRE2(arg1=arg1, arg2=arg2, <all the things that are the same go here>)
Thanks, it much clearer.
I made some changes and pushed them to the branch. I get that the pipeline fails, but it seems to be related to other features of ASE. Can you please take a look?
14:40:10
@sebastianecheverrir:matrix.org@sebastianecheverrir:matrix.orgimage.png
Download image.png
14:41:57

Show newer messages


Back to Room ListRoom Version: 5