summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <copr-devel@lists.fedorahosted.org>2023-02-25 02:25:15 +0000
committerCoprDistGit <copr-devel@lists.fedorahosted.org>2023-02-25 02:25:15 +0000
commit22ef3d3937e85d7f248f8565152011792ff7b66e (patch)
treef110f31d8ca525cf69aee1c2b8af672787647bd8
parentb4986702f515bdc689da36904809499d0f566c1b (diff)
automatic import of python3-gsdopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-gsd.spec347
-rw-r--r--sources1
3 files changed, 349 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..e6c48c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/gsd-2.8.0.tar.gz
diff --git a/python-gsd.spec b/python-gsd.spec
new file mode 100644
index 0000000..b58b460
--- /dev/null
+++ b/python-gsd.spec
@@ -0,0 +1,347 @@
+%global _empty_manifest_terminate_build 0
+Name: python-gsd
+Version: 2.8.0
+Release: 1
+Summary: General simulation data file format.
+License: BSD - 2 clause
+URL: https://gsd.readthedocs.io
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/2d/84/9f89b59705404ab78f5a49bee477832369515c9bc68448292843a4ffc3ae/gsd-2.8.0.tar.gz
+
+Requires: python3-numpy
+
+%description
+# GSD
+
+The **GSD** file format is the native file format for [HOOMD-blue](https://glotzerlab.engin.umich.edu/hoomd-blue/).
+**GSD** files store trajectories of the **HOOMD-blue** system state in a binary file with efficient random access to
+frames. **GSD** allows all particle and topology properties to vary from one frame to the next. Use the **GSD** Python
+API to specify the initial condition for a **HOOMD-blue** simulation or analyze trajectory output with a script. Read a
+**GSD** trajectory with a visualization tool to explore the behavior of the simulation.
+
+## Resources
+
+* [GSD documentation](http://gsd.readthedocs.io): Tutorials, Python API, C API, usage information, and format
+ specification.
+* [Installation Guide](INSTALLING.rst): Instructions for installing and compiling **GSD**.
+* [HOOMD-blue](https://glotzerlab.engin.umich.edu/hoomd-blue/): Simulation engine that reads and writes **GSD** files.
+* [hoomd-users Google Group](https://groups.google.com/d/forum/hoomd-users):
+ Ask questions to the **HOOMD-blue** community.
+* [freud](https://freud.readthedocs.io): A powerful set of tools for analyzing trajectories.
+* [OVITO](https://www.ovito.org/): The Open Visualization Tool works with **GSD** files.
+* [gsd-vmd plugin](https://github.com/mphoward/gsd-vmd): VMD plugin to support **GSD** files.
+
+## HOOMD examples
+
+Create a hoomd gsd file.
+```python
+>>> s = gsd.hoomd.Frame()
+>>> s.particles.N = 4
+>>> s.particles.types = ['A', 'B']
+>>> s.particles.typeid = [0,0,1,1]
+>>> s.particles.position = [[0,0,0],[1,1,1], [-1,-1,-1], [1,-1,-1]]
+>>> s.configuration.box = [3, 3, 3, 0, 0, 0]
+>>> traj = gsd.hoomd.open(name='test.gsd', mode='wb')
+>>> traj.append(s)
+```
+
+Append frames to a gsd file:
+```python
+>>> def create_frame(i):
+... s = gsd.hoomd.Frame();
+... s.configuration.step = i;
+... s.particles.N = 4+i;
+... s.particles.position = numpy.random.random(size=(4+i,3))
+... return s;
+>>> with gsd.hoomd.open('test.gsd', 'ab') as t:
+... t.extend( (create_frame(i) for i in range(10)) )
+... print(len(t))
+11
+```
+
+Randomly index frames:
+```python
+>>> with gsd.hoomd.open('test.gsd', 'rb') as t:
+... frame = t[5]
+... print(frame.configuration.step)
+4
+... print(frame.particles.N)
+8
+... print(frame.particles.position)
+[[ 0.56993282 0.42243481 0.5502916 ]
+ [ 0.36892486 0.38167036 0.27310368]
+ [ 0.04739023 0.13603486 0.196539 ]
+ [ 0.120232 0.91591144 0.99463677]
+ [ 0.79806316 0.16991436 0.15228257]
+ [ 0.13724308 0.14253527 0.02505 ]
+ [ 0.39287439 0.82519054 0.01613089]
+ [ 0.23150323 0.95167434 0.7715748 ]]
+```
+
+Slice frames:
+```python
+>>> with gsd.hoomd.open('test.gsd', 'rb') as t:
+... for s in t[5:-2]:
+... print(s.configuration.step, end=' ')
+4 5 6 7
+```
+
+## File layer examples
+
+```python
+with gsd.fl.open(name='file.gsd', mode='wb') as f:
+ f.write_chunk(name='position', data=numpy.array([[1,2,3],[4,5,6]], dtype=numpy.float32));
+ f.write_chunk(name='angle', data=numpy.array([0, 1], dtype=numpy.float32));
+ f.write_chunk(name='box', data=numpy.array([10, 10, 10], dtype=numpy.float32));
+ f.end_frame()
+```
+
+```python
+with gsd.fl.open(name='file.gsd', mode='rb') as f:
+ for i in range(1,f.nframes):
+ position = f.read_chunk(frame=i, name='position');
+ do_something(position);
+```
+
+
+%package -n python3-gsd
+Summary: General simulation data file format.
+Provides: python-gsd
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-cffi
+BuildRequires: gcc
+BuildRequires: gdb
+%description -n python3-gsd
+# GSD
+
+The **GSD** file format is the native file format for [HOOMD-blue](https://glotzerlab.engin.umich.edu/hoomd-blue/).
+**GSD** files store trajectories of the **HOOMD-blue** system state in a binary file with efficient random access to
+frames. **GSD** allows all particle and topology properties to vary from one frame to the next. Use the **GSD** Python
+API to specify the initial condition for a **HOOMD-blue** simulation or analyze trajectory output with a script. Read a
+**GSD** trajectory with a visualization tool to explore the behavior of the simulation.
+
+## Resources
+
+* [GSD documentation](http://gsd.readthedocs.io): Tutorials, Python API, C API, usage information, and format
+ specification.
+* [Installation Guide](INSTALLING.rst): Instructions for installing and compiling **GSD**.
+* [HOOMD-blue](https://glotzerlab.engin.umich.edu/hoomd-blue/): Simulation engine that reads and writes **GSD** files.
+* [hoomd-users Google Group](https://groups.google.com/d/forum/hoomd-users):
+ Ask questions to the **HOOMD-blue** community.
+* [freud](https://freud.readthedocs.io): A powerful set of tools for analyzing trajectories.
+* [OVITO](https://www.ovito.org/): The Open Visualization Tool works with **GSD** files.
+* [gsd-vmd plugin](https://github.com/mphoward/gsd-vmd): VMD plugin to support **GSD** files.
+
+## HOOMD examples
+
+Create a hoomd gsd file.
+```python
+>>> s = gsd.hoomd.Frame()
+>>> s.particles.N = 4
+>>> s.particles.types = ['A', 'B']
+>>> s.particles.typeid = [0,0,1,1]
+>>> s.particles.position = [[0,0,0],[1,1,1], [-1,-1,-1], [1,-1,-1]]
+>>> s.configuration.box = [3, 3, 3, 0, 0, 0]
+>>> traj = gsd.hoomd.open(name='test.gsd', mode='wb')
+>>> traj.append(s)
+```
+
+Append frames to a gsd file:
+```python
+>>> def create_frame(i):
+... s = gsd.hoomd.Frame();
+... s.configuration.step = i;
+... s.particles.N = 4+i;
+... s.particles.position = numpy.random.random(size=(4+i,3))
+... return s;
+>>> with gsd.hoomd.open('test.gsd', 'ab') as t:
+... t.extend( (create_frame(i) for i in range(10)) )
+... print(len(t))
+11
+```
+
+Randomly index frames:
+```python
+>>> with gsd.hoomd.open('test.gsd', 'rb') as t:
+... frame = t[5]
+... print(frame.configuration.step)
+4
+... print(frame.particles.N)
+8
+... print(frame.particles.position)
+[[ 0.56993282 0.42243481 0.5502916 ]
+ [ 0.36892486 0.38167036 0.27310368]
+ [ 0.04739023 0.13603486 0.196539 ]
+ [ 0.120232 0.91591144 0.99463677]
+ [ 0.79806316 0.16991436 0.15228257]
+ [ 0.13724308 0.14253527 0.02505 ]
+ [ 0.39287439 0.82519054 0.01613089]
+ [ 0.23150323 0.95167434 0.7715748 ]]
+```
+
+Slice frames:
+```python
+>>> with gsd.hoomd.open('test.gsd', 'rb') as t:
+... for s in t[5:-2]:
+... print(s.configuration.step, end=' ')
+4 5 6 7
+```
+
+## File layer examples
+
+```python
+with gsd.fl.open(name='file.gsd', mode='wb') as f:
+ f.write_chunk(name='position', data=numpy.array([[1,2,3],[4,5,6]], dtype=numpy.float32));
+ f.write_chunk(name='angle', data=numpy.array([0, 1], dtype=numpy.float32));
+ f.write_chunk(name='box', data=numpy.array([10, 10, 10], dtype=numpy.float32));
+ f.end_frame()
+```
+
+```python
+with gsd.fl.open(name='file.gsd', mode='rb') as f:
+ for i in range(1,f.nframes):
+ position = f.read_chunk(frame=i, name='position');
+ do_something(position);
+```
+
+
+%package help
+Summary: Development documents and examples for gsd
+Provides: python3-gsd-doc
+%description help
+# GSD
+
+The **GSD** file format is the native file format for [HOOMD-blue](https://glotzerlab.engin.umich.edu/hoomd-blue/).
+**GSD** files store trajectories of the **HOOMD-blue** system state in a binary file with efficient random access to
+frames. **GSD** allows all particle and topology properties to vary from one frame to the next. Use the **GSD** Python
+API to specify the initial condition for a **HOOMD-blue** simulation or analyze trajectory output with a script. Read a
+**GSD** trajectory with a visualization tool to explore the behavior of the simulation.
+
+## Resources
+
+* [GSD documentation](http://gsd.readthedocs.io): Tutorials, Python API, C API, usage information, and format
+ specification.
+* [Installation Guide](INSTALLING.rst): Instructions for installing and compiling **GSD**.
+* [HOOMD-blue](https://glotzerlab.engin.umich.edu/hoomd-blue/): Simulation engine that reads and writes **GSD** files.
+* [hoomd-users Google Group](https://groups.google.com/d/forum/hoomd-users):
+ Ask questions to the **HOOMD-blue** community.
+* [freud](https://freud.readthedocs.io): A powerful set of tools for analyzing trajectories.
+* [OVITO](https://www.ovito.org/): The Open Visualization Tool works with **GSD** files.
+* [gsd-vmd plugin](https://github.com/mphoward/gsd-vmd): VMD plugin to support **GSD** files.
+
+## HOOMD examples
+
+Create a hoomd gsd file.
+```python
+>>> s = gsd.hoomd.Frame()
+>>> s.particles.N = 4
+>>> s.particles.types = ['A', 'B']
+>>> s.particles.typeid = [0,0,1,1]
+>>> s.particles.position = [[0,0,0],[1,1,1], [-1,-1,-1], [1,-1,-1]]
+>>> s.configuration.box = [3, 3, 3, 0, 0, 0]
+>>> traj = gsd.hoomd.open(name='test.gsd', mode='wb')
+>>> traj.append(s)
+```
+
+Append frames to a gsd file:
+```python
+>>> def create_frame(i):
+... s = gsd.hoomd.Frame();
+... s.configuration.step = i;
+... s.particles.N = 4+i;
+... s.particles.position = numpy.random.random(size=(4+i,3))
+... return s;
+>>> with gsd.hoomd.open('test.gsd', 'ab') as t:
+... t.extend( (create_frame(i) for i in range(10)) )
+... print(len(t))
+11
+```
+
+Randomly index frames:
+```python
+>>> with gsd.hoomd.open('test.gsd', 'rb') as t:
+... frame = t[5]
+... print(frame.configuration.step)
+4
+... print(frame.particles.N)
+8
+... print(frame.particles.position)
+[[ 0.56993282 0.42243481 0.5502916 ]
+ [ 0.36892486 0.38167036 0.27310368]
+ [ 0.04739023 0.13603486 0.196539 ]
+ [ 0.120232 0.91591144 0.99463677]
+ [ 0.79806316 0.16991436 0.15228257]
+ [ 0.13724308 0.14253527 0.02505 ]
+ [ 0.39287439 0.82519054 0.01613089]
+ [ 0.23150323 0.95167434 0.7715748 ]]
+```
+
+Slice frames:
+```python
+>>> with gsd.hoomd.open('test.gsd', 'rb') as t:
+... for s in t[5:-2]:
+... print(s.configuration.step, end=' ')
+4 5 6 7
+```
+
+## File layer examples
+
+```python
+with gsd.fl.open(name='file.gsd', mode='wb') as f:
+ f.write_chunk(name='position', data=numpy.array([[1,2,3],[4,5,6]], dtype=numpy.float32));
+ f.write_chunk(name='angle', data=numpy.array([0, 1], dtype=numpy.float32));
+ f.write_chunk(name='box', data=numpy.array([10, 10, 10], dtype=numpy.float32));
+ f.end_frame()
+```
+
+```python
+with gsd.fl.open(name='file.gsd', mode='rb') as f:
+ for i in range(1,f.nframes):
+ position = f.read_chunk(frame=i, name='position');
+ do_something(position);
+```
+
+
+%prep
+%autosetup -n gsd-2.8.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-gsd -f filelist.lst
+%dir %{python3_sitearch}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Sat Feb 25 2023 Python_Bot <Python_Bot@openeuler.org> - 2.8.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..0b0e1a4
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+73844878373b110efbbc0406334cc5d9 gsd-2.8.0.tar.gz