You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Refactor Atoms_density class to AnalysisBase
* move the deprecated density class to bottom
* add doc for new atom density class
* Update tests/analysis/atom_density/test_atom_density.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update docs/analysis/atom_density.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/analysis/atom_density.md
+57-5Lines changed: 57 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,13 +44,16 @@ Next, we move to the analysis of water density at interfaces.
44
44
To perform the water density analysis, the indices of oxygen atoms between two interfaces are need to be specified, as shown in the `O_idx` of the above figure. Again, you can find the indices using the method `find_idx_from_range`, and put these indices (`List`) in the `inp_dict["density_type"]["idx_list"]`. Here, the `density_unit` should be set to `"water"` because the coordinates of oxygen atoms are treated as the positions of water molecules and are converted to water density through unit conversion.
45
45
46
46
## Usage
47
-
Now, we import the analysis class `AtomDensity` and gather the following mentioned parameters.
47
+
Now, we import the analysis class `AtomDensity` and gather the above mentioned parameters into a dictionary `inp`. Because the `AtomDensity` class is based on the `AnalysisBase` class from the MDAnalysis package, an `Universe` object is necessary to use the class.
48
+
We recommend that users instantiate an `Universe` object by themselves as follows. The dictionary `inp` is not required.
48
49
```python
49
50
from ectoolkits.analysis.atom_density import AtomDensity
50
51
51
-
#from
52
-
inp_dict={
52
+
#The following input
53
+
inp={
53
54
"xyz_file": "./Hematite-pos-1.xyz", # the path to the xyz trajecotry.
55
+
"format": "XYZ", # could be other formats for trajectories. Please refer to MDAnalysis
For users using the following old input. We recommend use the function `run_atom_density_analysis` to parse the input. The usage is present as follows:
116
+
```python
117
+
from ectoolkits.analysis.atom_density import run_atom_density_analysis
118
+
119
+
# from
120
+
inp_dict={
121
+
"xyz_file": "./Hematite-pos-1.xyz", # the path to the xyz trajecotry.
0 commit comments