potfit wiki

open source force-matching

User Tools

Site Tools


dev

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

dev [2013/02/28 13:33] – created danieldev [2013/03/01 08:36] (current) daniel
Line 1: Line 1:
-__NOTOC__ +~~NOTOC~~ 
-Here we give some hints on how to extend ''potfit''. In particular, we list some common pitfalls that are to be avoided.+====== Dev's Corner ====== 
 +---- 
 +Here we give some hints on how to extend //potfit//. In particular, we list some common pitfalls that are to be avoided.
  
-=== Indentation ===+====  Indentation  ====
  
-''potfit'' source code is indented according to the default emacs indentation. The same effect can be achieved with the [http://www.gnu.org/software/indent/ GNU indent command], version >=2.2.10, using the following command:+//potfit// source code is indented according to the default emacs indentation. The same effect can be achieved with the [[http://www.gnu.org/software/indent/|GNU indent command]], version >=2.2.10, using the following command:
  
- indent -gnu -cdw -cli4 -npsl -npcs -di6 -ncs -ce -br -brs -nlp -hnl -l110 -bbo \ +<code bash>indent -gnu -cdw -cli4 -npsl -npcs -di6 -ncs -ce -br -brs -nlp -hnl -l110 -bbo  
- -T real -T apot_table_t -T pot_table_t -T vector -T sym_tens -T neigh_t -T atom_t -T FILE -T Param_T -T Interaction_T *.[ch]+ -T real -T apot_table_t -T pot_table_t -T vector -T sym_tens -T neigh_t -T atom_t -T FILE -T Param_T -T Interaction_T *.[[ch]]</code>
  
 Sections that are NOT to be indented in this way have to be marked with Sections that are NOT to be indented in this way have to be marked with
Line 19: Line 21:
 at their end, each control comment on a line of its own. at their end, each control comment on a line of its own.
  
-=== Introducing new parameters ===+====  Introducing new parameters  ====
  
 Before a new parameter can be used, it must be Before a new parameter can be used, it must be
  
-* declared and initialized to default value (in file potfit.h) +  * declared and initialized to default value (in file ''potfit.h''
-* read into potfit (routine getparamfile() in file param.c) +  * read into potfit (routine getparamfile() in file ''param.c''
-* possibly checked for nonsense values (routine check_parameters_complete() in file param.c) +  * possibly checked for nonsense values (routine ''check_parameters_complete()'' in file ''param.c''
-* broadcast to the other CPUs (routine broadcast_params() in file mpi_utils.c)+  * broadcast to the other CPUs (routine ''broadcast_params()'' in file ''mpi_utils.c'')
  
-=== Naming conventions for files ===+====  Naming conventions for files  ====
  
-* Source files are all named with lower case letters +  * Source files are all named with lower case letters 
-* Non-source files in the source directory begin with a capital letter (e.g. Makefile, README, INSTALL) +  * Non-source files in the source directory begin with a capital letter (e.g. Makefile, README, INSTALL) 
-* Documentation should be written, in English and in HTML or Wiki-Markup.+  * Documentation should be written, in English and in HTML or Wiki-Markup.
  
dev.1362054819.txt.gz · Last modified: 2013/02/28 13:33 by daniel