richard-evans / vampire

Atomistic simulator for magnetic materials
GNU General Public License v2.0
122 stars 92 forks source link

Vdc #60

Closed daniel-meilak closed 3 years ago

daniel-meilak commented 3 years ago

1) Vdc is updated to include latest changes in develop branch as of 02/05/2021

2) Vdc input is redesigned: Most input parameters passed in the command line are removed. Instead the user must create a new file, default "vdc_input", from which all input parameters are read. This will help with long lists of parameters which are continually reused to adjust output.

So far no new parameters have been added however the intention is to add several more parameters for choosing Povray options such as camera position, backgroud colour, spin arrow shape and size etc. This will make it less necessary to manually edit (and understand) the spins.pov file.

Input parameters are now parsed using an unordered_map. All old parameters have been implemented as well as various aliases to help with user input mistakes. For example, "colourmap" can also be written wrong ("colormap"), and will not result in an unknown control statement error. As they have been implemented in a hash table, lookup times should be faster than old if-else method.

An additional command line parameter, "-h" or "--help", has been added. Can now query the usage of the input parameters by typing: ./vdc -h [parameter_name]. Information includes the parameter name, input argument type and number, description and default value.

daniel-meilak commented 3 years ago

Included several more changes: Vampire manual - added \phantomsection to all \addcontentsline, which makes links in the TOC take you to the right place for each parameter. Hopefully this does not cause any unexpected behaviour however it can be very easily undone by removing all occurences of \phantomsection in the document.

Vdc: Bug fix - an issue was occuring due to the usage of atan2 in calculating spin angles. This code has been removed and replace with a much more simple usage of acos. Input file options - several new options have been added to adjust the povray camera position, look at point and background colour, as well as the atom and spin arrow sizes for each material. debug option - vdc can be compiled with debug flags by using make vdc-debug, which creates the executable vdc-debug, and vdc object files can be removed by using make vdc-purge. In future, can also consider combigning vdc-purge into the main make purge option -h option - formatting of help messages has been changed slightly and more help messages have been added for the new input file parameters

To do: Manual pages for vdc need to be updated to explain vdc-input file usage and the new parameters included. Also these parameters need to be added to the TOC

daniel-meilak commented 3 years ago

I probably went a little too far and changed how the manual indents and spaces paragraphs because the document had over 300 over/underfull hbox warnings. After going through each chapter and removing \\ and \par, there are now less that 10 warnings. Also I was annoyed by the inconsistent lowercase/uppercase usage for parameter descriptions.

The visualisation chapter has been updated to a similar format to the input and material file reference chapters, and includes all new input file options.

Probably best to check if the manual can be compiled without error on a Mac as I may have inadvertently changed something at the beginning to compile it on Ubuntu using TexLive.