Back to main menu

Informations for developers

This file contains some recommendations for developers who would like to add their contribution to pikashu (either for their personal use or for public release).

Structure of the program and files

The program is organized in the following way:

Although it is not mandatory, developers are invited to keep this file structure and notations if they add new modules.

Adding a file format to read in

Each module managing input (which names should start with in_) should read in one specific file format, and output it to pikashu.xyz which is extended XYZ format (.xyz).

If necessary, take example on the existing modules.

Then, the source code needs to be edited in the following way:

Also, please add the new format in the documentation (i.e. DISPLAY_HELP in the file messages.f90, and in doc/formats.html), and indicate the restrictions if there are any.

Adding a file format to write to

Each module managing output (whose names should start with out_) should read pikashu.xyz, and output it to one specific file format.

If necessary, take example on the existing modules.

Then, the source code needs to be edited in the following way:

Also, please add the new format in the documentation (i.e. DISPLAY_HELP in the file messages.f90, and in doc/formats.html), and indicate the restrictions if there are any.

Adding an option

Because options apply to the internal file pikashu.xyz, they have to comply to two rules: first, they have to manipulate only extended XYZ files, both as input and as output; and second, both input and output files must be the file pikashu.xyz. So you have to keep in mind that in these modules, the input file and the output file have to be the same: don't write in the file while you are reading it! It is up to you if you prefer to store intermediate atomic positions in another temporary file or in the memory.

If you develop a module that applies some transformation on the atomic positions, you can include it in the program by editing the following files:

Also, please add the new option in the documentation (i.e. DISPLAY_HELP in the file messages.f90, and in doc/options.html), and indicate the restrictions if there are any.

Back to main menu