Comments (6)
Oh wow that really looks awesome!
from dftk.jl.
I started to take a look at this, by trying to change the default callback. Although I have a MWE, I can't find a way to write a full code to solve the issue.
The problem is that the default callback (ScfDefaultCallback) prints the information which we give him without much structure. What I mean by that is that when using the default callback, it prints various values according to a set of given parameters info, which is updated at each iteration of the solver.
However, SolverTraces requires to first define the number and name of columns which need to be printed: I have not found a way to hide or skip some columns. So the solution I have is to define a column for all the values which could be printed, and fill only the ones which are intersting. I think a picture is in order:
As you can see here, I have not found a generic way to keep none, one or several of the columns Magnet, alpha and Diag, and have to print them all: some have default values (I put Inf there) and can be a bit ugly.
I am still investigating, but I wanted to see if you had any ideas or clues. I might reach out to the creator of SolverTraces to see if he has plans to add a way to hide some columns or values (or do it myself if he agrees).
Edit: I can always define a model for each possibility (one with only Magnet, one with only Diag...), and use the relevant one. This works, but that isn't very clean, as it comes to defining 8 models just to use one...
from dftk.jl.
Hm, I wonder if this is not more trouble than it's worth, it looks like it's going to be more trouble trying to fit our custom printing into their framework than it's worth...
from dftk.jl.
That was also what I was considering. I can submit a pull request if you want to take a look at the code. But I feel like the current workflow is not that compatible with the actual version of SolverTraces, as it requires to know exactly what we want to print.
Another problem I encountered is with the step: you have to declare the maximum number of steps when creating a SolverTrace object in order to have those pretty [?/10] markers. However, in our case, it can be hard to know beforehand the exact number of iterations. And because of the way the SolverTrace object is defined (by using immutables structures), you can't change the maximum number of steps after creating an instance of SolverTrace.
from dftk.jl.
OK let's not bother then. Thanks for looking into this!
from dftk.jl.
Yes, I think it is best. I have a functional code, but feel like it doesn't bring much -and since SolverTrace doesn't seem very flexible in our case, I think it could raise issues in the future if we want to display other type of information.
from dftk.jl.
Related Issues (20)
- Precompilation causes warning HOT 1
- Rounding issues cause bad wannier interface HOT 4
- unit and equation of calculated force HOT 2
- how to customize/define an xc functional HOT 2
- Multicomponent HOT 4
- Minus sign in Fourier transform of projectors HOT 6
- Unexpected error when using Crystallographic Information Framework (CIF) File Input HOT 5
- Use TestItemRunner.jl for managing tests
- Some characters in `https://docs.dftk.org/dev/developer/symmetries/#Crystal-symmetries` are not rendered HOT 11
- Elastic constants HOT 7
- ExtXYZ segfault HOT 1
- Stresses need an unreasonable amount of memory and runtime
- Space group numbers and symmetries
- Fix phase when possible HOT 2
- Make sure guess_density returns something with correct total charge
- Include `Manifest.toml` in the repo? HOT 2
- Use BenchmarkCI to automatically detect major runtime regressions HOT 3
- Gpu CI Failure HOT 2
- Maybe plot non-converged bands differently HOT 8
- Exact exchange status
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dftk.jl.