Skip to content

Commit

Permalink
add installation to web docs
Browse files Browse the repository at this point in the history
  • Loading branch information
briantoby committed Apr 3, 2024
1 parent 73d5794 commit 57a15a9
Show file tree
Hide file tree
Showing 17 changed files with 192 additions and 12 deletions.
4 changes: 2 additions & 2 deletions webdocs/compile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Installation of compilers is highly depend on the computer system being used, bu

conda install gfortran_osx-64 scons

Use the `conda search gfortran` command to find the name for the package.
On most linux systems, one can use a command such as `sudo apt-get gfortran` or `yum install gcc-gfortran`. Also see ​https://gcc.gnu.org/wiki/GFortranBinaries for more information.
Use the ``conda search gfortran`` command to find the name for the package.
On most linux systems, one can use a command such as ``sudo apt-get gfortran`` or ``yum install gcc-gfortran``. Also see ​https://gcc.gnu.org/wiki/GFortranBinaries for more information.

Note that the intent is that this Scons-based process will be replaced with one to run under meson in mid-2024. In the meantime, some older web pages discussing compiling GSAS-II may be of use:

Expand Down
26 changes: 21 additions & 5 deletions webdocs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,35 @@
:align: right

====================================
Welcome to the GSAS-II home page
Home Page for GSAS-II
====================================

GSAS-II is a unique and comprehensive open source Python project for determination of crystal structures and diffraction-based materials characterization for crystalline solids on all scales, from perovskites through proteins, using both powder and single-crystal diffraction and with both x-ray and neutron probes. Refinements can combine measurements from laboratory and synchrotron x-rays, as well as constant wavelength or time-of-flight neutron sources. It provides structure solution and refinement, as well as extensive visualization capabilities.
Welcome to the home page for GSAS-II, a unique and comprehensive open
source Python project for determination of crystal structures and
diffraction-based materials characterization for crystalline solids on
all scales, from perovskites through proteins, using both powder and
single-crystal diffraction and with both x-ray and neutron
probes. Refinements can combine measurements from laboratory and
synchrotron x-rays, as well as constant wavelength or time-of-flight
neutron sources. It provides structure solution and refinement, as
well as extensive visualization capabilities.

GSAS-II is made available for free use (`see license <https://raw.githubusercontent.com/AdvancedPhotonSource/GSAS-II/master/LICENSE>`_) with open access to ​the `source code <https://github.com/AdvancedPhotonSource/GSAS-II>`_.
Please help us by citing

Toby, B. H., & Von Dreele, R. B. (2013). "GSAS-II: the genesis of a modern open-source all purpose crystallography software package". *Journal of Applied Crystallography*, **46**\(2), 544-549. ​doi:10.1107/S0021889813003531

Note that some sections of the program utilize externally provided codes, with citations provided
Note that some sections of the program utilize externally provided
codes or reference later work, with citations provided
as they are used. *Please* cite them as well.

Also, please do sign up for the ​GSAS-II mailing list `see below <mailinglist.html>`_.
We add new features to GSAS-II quite frequently, so we may break things from time to time :strike:`(see bug reporting, below)`. Be sure to use the Help-->Update capability frequently to stay abreast of new features and fixes as they are added and please make sure to use the latest version before reporting a bug to us.
We add new features to GSAS-II quite frequently, so we may break
things from time to time `(see bug reporting, below <bug.html>)`_. Be
sure to use the Help-->Update capability frequently to stay abreast of
new features and fixes as they are added and please make sure to use
the latest version before reporting a bug to us, but *please* do report
bugs.

.. toctree::
:maxdepth: 2
Expand All @@ -30,4 +44,6 @@ We add new features to GSAS-II quite frequently, so we may break things from tim
bug.rst
compile.rst
install-g2f-win.rst
install-g2f-mac.rst
install-g2f-linux.rst
install-pip.rst
49 changes: 49 additions & 0 deletions webdocs/install-g2f-linux.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.. raw:: html

<style> .clear {clear: both;}</style>

.. image:: ./images/gsas2.png
:scale: 25 %
:alt: GSAS-II logo
:align: right

========================================================
Detailed Description of the Linux Installation Process
========================================================
The exact details for how the installation is performed will depend on "flavor" of Linux in use. Here I am using Ubuntu.

1) In a terminal window paste the commands::

g2="https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/gsas2full-Latest-Linux-x86_64.sh"
curl -L "$g2" > /tmp/g2.sh; bash /tmp/g2.sh -b -p ~/g2full

as seen to right. Note that I have chosen to install in location ``~/g2full`` (which is subdirectory ``g2full`` in my home directory), but you can install this where you prefer.
.. image:: ./linux_inst_images/1.png
:scale: 25 %
:alt: commands in terminal window
:align: right

.. raw:: html

<div class="clear"></div>

2) This will run for a few minutes (or longer depending on download speeds) and then the conda installation process will start, with the display of lots of text. At the end, the terminal window will appear as seen to the right. Note the addition of the GSASII file on the desktop (this may not happen on all Linux desktop managers.). The installation has been completed.

.. image:: ./linux_inst_images/2.png
:scale: 25 %
:alt: completion commands in terminal window
:align: right

.. raw:: html

<div class="clear"></div>

3) Note the red "X" on the desktop icon and the "grayed-out" colors. This is because by default new icons are disabled. Right-click on the icon and select "Allow launching" from the menu. The "X" disappears and colors return to normal, as seen in the upper right.

Clicking on the icon will open GSAS-II. Likewise a GSAS-II project (.gpx) file can be dragged onto the icon to open that file in GSAS-II.

.. image:: ./linux_inst_images/3.png
:scale: 25 %
:alt: activate terminal icon
:align: right
115 changes: 115 additions & 0 deletions webdocs/install-g2f-mac.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
. raw:: html

<style> .clear {clear: both;}</style>

.. image:: ./images/gsas2.png
:scale: 25 %
:alt: GSAS-II logo
:align: right

========================================================
Detailed Description of the Mac Installation Process
========================================================

1) The first step in this process is to open a terminal window. There are many ways on a Mac to do this, but one of the most easy is to click on the magnifying glass for Spotlight, as shown to the right, and then type terminal and finally click on the terminal application.

.. image:: ./mac_inst_images/1.png
:scale: 25 %
:alt: open terminal window
:align: right


.. raw:: html

<div class="clear"></div>

2) Into the terminal window paste these commands (for an ARM aka "Apple Silicon" or M1, M2,... Mac)::
g2="https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/gsas2full-Latest-MacOSX-arm64.sh"
curl -L "$g2" > /tmp/g2.sh; bash /tmp/g2.sh -b -p ~/g2full

Or on an older Intel Mac::
g2="https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/download/v1.0.1/gsas2full-Latest-MacOSX-x86_64.sh"
curl -L "$g2" > /tmp/g2.sh; bash /tmp/g2.sh -b -p ~/g2full
as seen to right. If you are not sure which you have, use "About This Mac" and look for the 1st line which will say "Chip" or "Processor" and will either list Intel or M1, M2,... Note that I have chosen to install in location ``~/g2full`` (which is subdirectory ``g2full`` in my home directory), but you can install where you prefer. Note that nothing happens until the Return key is pressed.
.. image:: ./mac_inst_images/2.png
:scale: 25 %
:alt: terminal commands
:align: right


.. raw:: html

<div class="clear"></div>


3) Once Return is pressed, the download of the installation kit file is started, which may take a while (typically minutes), depending on your internet connection speed.

.. image:: ./mac_inst_images/3.png
:scale: 25 %
:alt: start of download
:align: right


.. raw:: html

<div class="clear"></div>

4) After the download is complete, the installation starts and that usually completes in a minute or two, as seen to the right.

.. image:: ./mac_inst_images/4.png
:scale: 25 %
:alt: download complete
:align: right


.. raw:: html

<div class="clear"></div>

5) The installer will create a Mac app as a shortcut for running GSAS-II and will open the folder containing it. You cannot move that app from the folder. You can start GSAS-II by double-clicking this icon or by dropping a GSAS-II project (.gpx) file on it.

You can, if you wish, drag it to the doc, as seen to the right. In the doc, you can also start GSAS-II by single-clicking this icon or by dropping a GSAS-II project (.gpx) file on it.

.. image:: ./mac_inst_images/5.png
:scale: 25 %
:alt: drag to doc
:align: right

.. raw:: html

<div class="clear"></div>

6) Alternately, if you do want to place the shortcut somewhere, for example in the desktop, you can create an alias of the app by control-clicking on the icon (or right-clicking with a three-button mouse) and select "Make Alias" in the pop-up menu. This will create a new copy of the GSAS-II icon labeled "GSAS-II alias". You can then start GSAS-II by double-clicking this icon or by dropping a GSAS-II project (.gpx) file on it.

.. image:: ./mac_inst_images/6.png
:scale: 25 %
:alt: download complete
:align: right


.. raw:: html

<div class="clear"></div>

7) Once the alias icon is created, it can be dragged to any folder or the desktop. Once moved, it can be renamed if desired.

.. image:: ./mac_inst_images/7.png
:scale: 25 %
:alt: download complete
:align: right


.. raw:: html

<div class="clear"></div>

Note: When the icon is first used, you will likely see one or more Mac security warnings asking you to confirm that you do want to give GSAS-II access to components in your computer, as shown to the right. GSAS-II will not run properly unless you press "Allow". Each warning should only be shown once.

.. image:: ./mac_inst_images/w1.png
:scale: 25 %
:alt: download complete
:align: right
2 changes: 1 addition & 1 deletion webdocs/install-g2f-win.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Detailed Description of the Windows Installation Process
:alt: Select installation folder
:align: right

6) The default installation folder is usually fine, but I often prefer to change this to `C:\G2` or something short. Some compters have been set so you must place the GSAS-II files within your account, however.
6) The default installation folder is usually fine, but I often prefer to change this to ``C:\G2`` or something short. Some compters have been set so you must place the GSAS-II files within your account, however.

.. raw:: html

Expand Down
8 changes: 4 additions & 4 deletions webdocs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ where:
* <platform> is replaced by ``Linux-x86_64.sh`` for Linux, ``MacOSX-arm64.sh`` for MacOS with "Apple Silicon" (M1, etc.) processors and ``MacOSX-x86_64.sh`` is for older Intel-based machines. Note that the ``MacOSX-x86_64.sh`` installer will run on "Apple Silicon" processors, but significantly more slowly.
* <install-loc> is where you want to install the software. (Use of ``~/g2full`` (a subdirectory named ``g2full`` in your home directory is a good choice.) After installation is complete, you may be asked if you want to place a shortcut for GSAS-II into the MacOS dock.

More complete installation instructions are provided for [TBD MacOS] and [TBD Linux].
More complete installation instructions are provided for `MacOS <install-g2f-mac.html>`_ and `Linux <install-g2f-linux.html>`_.


GSAS2PKG Conda Package
Expand All @@ -51,13 +51,13 @@ This creates a conda virtual environment named ``GSASII`` (this can be changed)
Installing GSAS-II after Python Installation
=============================================

A small number of users or sites prefer to use Python distributions supplied via other routes (such as Debian packages) or using `PyPi <https://pypi.org/ PyPI>`_, etc. or prefer to handle use of conda on their own. Some discussion on Python installation is
A small number of users or sites prefer to use Python distributions supplied via other routes (such as Debian packages) or using `PyPi <https://pypi.org>`_, etc. or prefer to handle use of conda on their own. Some discussion on Python installation is
`found here <install-pip.html>`_. Independent of how Python is installed, multiple packages are needed, please see the
`discussion on Python package requirements <https://gsas-ii.readthedocs.io/en/latest/packages.html#gui-requirements>`_, noting that the GSAS-II GUI requires at a minimum wxPython, matplotlib,
PyOpenGL, NumPy and SciPy, while for scripting use, only NumPy and SciPy are required. For full functionality, several other optional packages are needed.
If versions other than those recommended are selected (Python=3.11 and NumPy=1.26), you will likely need to either locate older binaries and install them manually or run the compilation yourself (`see compilation information <https://advancedphotonsource.github.io/GSAS-II-tutorials/compile.html>`_).
If versions other than those recommended are selected (Python=3.11 and NumPy=1.26), you will likely need to either locate older binaries and install them manually or compile them yourself (`see compilation information <https://advancedphotonsource.github.io/GSAS-II-tutorials/compile.html>`_).

A simple way to install GSAS-II with a supplied Python environment uses the `gitstrap.py` script provided for this purpose. Use these commands (on any platform) to install GSAS-II::
A simple way to install GSAS-II with a supplied Python environment uses the ``gitstrap.py`` script provided for this purpose. Use these commands (on any platform) to install GSAS-II::

cd ~/G2
curl -L -O https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/raw/main/install/gitstrap.py
Expand Down
Binary file added webdocs/linux_inst_images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/linux_inst_images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/linux_inst_images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/mac_inst_images/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/mac_inst_images/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/mac_inst_images/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/mac_inst_images/4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/mac_inst_images/5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/mac_inst_images/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/mac_inst_images/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webdocs/mac_inst_images/w1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 57a15a9

Please sign in to comment.