{"id":45389453,"url":"https://github.com/siesta-project/flos","last_synced_at":"2026-02-21T18:17:46.128Z","repository":{"id":53023742,"uuid":"79812351","full_name":"siesta-project/flos","owner":"siesta-project","description":"Interfacing SIESTA to Lua scripts using the flook code","archived":false,"fork":false,"pushed_at":"2022-12-07T14:13:45.000Z","size":270,"stargazers_count":6,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-01-29T11:45:42.071Z","etag":null,"topics":["cell-vectors","conjugate-gradient","density-functional-theory","geometry","lbfgs-algorithm","lua-library","lua-script","optimization","relaxation","siesta"],"latest_commit_sha":null,"homepage":"https://siesta-project.github.io/flos/index.html","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siesta-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-23T14:36:32.000Z","updated_at":"2023-04-03T10:29:46.000Z","dependencies_parsed_at":"2023-01-23T17:35:13.576Z","dependency_job_id":null,"html_url":"https://github.com/siesta-project/flos","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/siesta-project/flos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siesta-project%2Fflos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siesta-project%2Fflos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siesta-project%2Fflos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siesta-project%2Fflos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siesta-project","download_url":"https://codeload.github.com/siesta-project/flos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siesta-project%2Fflos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29689683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cell-vectors","conjugate-gradient","density-functional-theory","geometry","lbfgs-algorithm","lua-library","lua-script","optimization","relaxation","siesta"],"created_at":"2026-02-21T18:17:42.127Z","updated_at":"2026-02-21T18:17:46.114Z","avatar_url":"https://github.com/siesta-project.png","language":"Lua","readme":"# flos\n\nThis library enables optimization schemes created in Lua to be\nused together with [SIESTA][siesta] via the [flook][flook] library, hence\nthe same `flo + SIESTA = flos`.\n\nThis enables scripting level languages to inter-act and develop\nnew MD schemes, such as new geometry constraints, geometry relaxations, etc.\n\nThe API documentation may be found [here][flos-doc].\n\n## Requirements\n\nThe only requirement is the Lua language.\n\nThe require Lua version is 5.3. However, if you are stuck with Lua 5.2 you\ncan apply this patch:\n\n    patch -p1 \u003c lua_52.patch\n\n## Installation\n\nThis Lua library may be used out of the box. To enable the use of this library\nyou only require the `LUA_PATH` to contain the path to the library.  \nImportantly this library requires an explicit `\u003cpath\u003e/?/init.lua` definition.\n\nAs an example the following bash commands enables the library:\n\n    cd $HOME\n    git clone https://github.com/siesta-project/flos.git\n\tcd flos\n\tgit submodule init\n\tgit submodule update\n\texport LUA_PATH=\"$HOME/flos/?.lua;$HOME/flos/?/init.lua;$LUA_PATH;;\"\n\nand that is it. Now you can use the `flos` library.\n    \n\n## Basic usage\n\nTo enable this library you should add this to your Lua script:\n\n    local flos = require \"flos\"\n\nwhich enables you to interact with all implemented `flos` implemented algorithms.\n\n\n## Usage in SIESTA\n\nIn principle `flos` is not relying on the [SIESTA][siesta] routines and may\nbe used as a regular Lua library, although it has been developed\nwith [SIESTA][siesta] in mind.\n\nIn the `examples/` folder there are several examples which may be directly used in _any_\n[SIESTA][siesta] run for relaxation (they are generalized for any structure).\n\nIn order to use any of these schemes you simply need to follow these steps:\n\n1. Compile `flook`, see this page: [`flook`][flook]\n2. Compile [SIESTA][siesta] with `flook` support. If you have followed the\n   procedure outlined [here][flook] you should add this to the SIESTA `arch.make`:\n\n        FLOOK_PATH  = /path/to/flook/parent\n        FLOOK_LIBS  = -L$(FLOOK_PATH) -lflookall -ldl\n        FLOOK_INC   = -I$(FLOOK_PATH)\n        INCFLAGS += $(FLOOK_INC)\n        LIBS += $(FLOOK_LIBS)\n\t    FPPFLAGS += -DSIESTA__FLOOK\n\n3. Then you have, for good (contrary to the `constr` routine in SIESTA), \n   enabled the Lua hook and you may exchange Lua scripts with other users\n   and use scripts as you please.  \n   To enable Lua in SIESTA simply set these fdf-flags:\n\n        MD.TypeOfRun lua\n        LUA.Script \u003cscript-name\u003e\n\nFor instance to use the `flos` L-BFGS relaxation method:\n\n    cp flos/examples/relax_geometry_lbfgs.lua \u003cpath-to-siesta-run\u003e/relax.lua\n\nand set the following fdf-flag:\n\n    MD.TypeOfRun LUA\n    LUA.Script relax.lua\n\nNow run SIESTA.\n\n\n[flook]: https://github.com/ElectronicStructureLibrary/flook\n[flos-doc]: https://siesta-project.github.io/flos/index.html\n[siesta]: https://launchpad.net/siesta\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiesta-project%2Fflos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiesta-project%2Fflos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiesta-project%2Fflos/lists"}