File: sources.rst

package info (click to toggle)
finalcif 154%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 53,284 kB
  • sloc: fortran: 148,126; python: 50,133; cpp: 67; sh: 51; makefile: 22
file content (85 lines) | stat: -rw-r--r-- 2,021 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.. _document-sources:

========================
Running from Source Code
========================


In case you want to play with the source code and make your own modifications to FinalCif, 
get the `code from Github <https://github.com/dkratzert/FinalCif>`_.

In order to run FinalCif from the source code directly, you need to install Python3 >= 3.7 but >= 3.9 is advisable:
https://www.python.org/

Until now, I was just too lazy to build proper Linux packages and therefore only single-file executables
made with `pyinstaller <https://www.pyinstaller.org/>` exist. They are large and run sub-optimal in different
Linux distributions.

But for Ubuntu, there is an installer script that does all steps necessary for an installation from source automatically.
Apart from the Python installation, the script should work in any Linux or MacOS distribution:

First go into the directory where you like to have FinalCif, e.g.:

.. code-block:: bat

    cd /home/username/Downloads

Load the script:

.. code-block:: bat

    wget https://raw.githubusercontent.com/dkratzert/FinalCif/master/scripts/finalcif-start.sh

Make it executable:

.. code-block:: bat

    chmod u+x ./finalcif-start.sh

Install Python3.9:

.. code-block:: bat

    ./finalcif-start.sh -pyinst

Install FinalCif:

.. code-block:: bat

    ./finalcif-start.sh -install

Run FinalCif:

.. code-block:: bat

    ./finalcif-start.sh

Next time, just run ./finalcif-start.sh.


Manual install from source
--------------------------

Clone the repository from GitHub:

.. code-block:: bat

   git clone https://github.com/dkratzert/FinalCif.git
   cd FinalCif

Install a virtual environment and activate it:

.. code-block:: bat

    install_requirements.bat

Run FinalCif:

.. code-block:: bat

    run_finalcif.bat

I am always open for suggestions by users. Please tell me if something does not work as expected!

FinalCif uses the great `gemmi CIF parser <https://gemmi.readthedocs.io/en/latest/index.html>`_ for all CIF reading
and writing operations.