QMCPACK / QMCPACK/qmcpack

Can we simplify SpaceGrid input?

Open
#5,222 7 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
C++
Stars
403
Forks
154
Avg merge
1d 12h
Merged PRs (30d)
82

Description

I'm going through the manual section for space grid. It is new to me and treat me as a user. Input needs to be designed simple, straightforward, as much self-explained as possible.
In the case of `Cartesian`.
```






```
I first hit this `p1` attribute. Then I realized that I need to understand `reference_points` which provides a set of points for later use in specifying the origin and coordinate axes needed to construct a spatial histogramming grid. There are a few predefined points like "zero", "a1", "a2", "a3" **which are defined as points not vectors**.

back to `p1`, based on the documentation of `origin`
```
p1/p2/fraction: The location of the origin is set to p1+fraction*(p2-p1). If only p1 is provided, the origin is at p1
```
**Q1** how to specify an arbitrary point simply via "x y z" as origin? Explicit `reference_points` can fix this issue and thus there is no need to "p1/p2/fraction". Can we simplify this?

next is `axis`, I assume `axis` being a vector. Based on the definition of `p1` it is a point.
**Q2** Is the vector defined from `origin` to p1 or "zero" to p1 when `origin` is not "zero"?

I feel better to use
```
! this should be default and can be omitted
! we define one unit on the 'x' axis as from the specified origin to destination.
```

`grid` and `scale`. manual says "The allowed grid points fall in the range [-1,1] for label=x/y/z or [0,1] for r/phi/theta." I found it [-1. 1) a bit unusual choice and it also requires additional scale=".5" to address the rescaling. **Q3** Why not using `[0, 1)`?
**Q4** manual says "scale" is only used when `p2` exists. "The axis vector is set to p1+scale*(p2-p1). If only p1 is provided, the axis vector is p1." however, I feel `scale=0.5` is necessary make "[-1 1)" representing one unit cell. I feel a lot simpler with `[0, 1)` and `scale` can be dropped.

The manual says "A grid of 10 evenly spaced points between 0 and 1 can be requested equivalently by grid="0 (0.1) 1" or grid="0 (10) 1."".
**Q5** can we stick to one style instead of two confusing ways? My pick is
```

```

Manual also mentions "Piecewise uniform grids covering portions of the range are supported, e.g., grid="-0.7 (10) 0.0 (20) 0.5.""
**Q6** Is this supported?

Then the spherical example "Energy density estimator accumulated within spheres of radius 6.9 Bohr centered on the first and second atoms in the ion0 particleset."
```


r1 1 0 0
r2 0 1 0
r3 0 0 1












```
I'm further confused,
a) `r1`, `r2`, `r3` doesn't seem to be points but more like vectors.
b) What is the definition of "scale", why "phi", "Theta" needs it?

Can we put some efforts to well define our input and then we get less struggle with implementing the feature?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.