Home   Manual

Need help finding molecules and crystals download location for Flatpak

Hi,
I am trying to update avogadrolibs 1.94.0.

I need to add molecules and crystals folder to avogadrolibs before building in Flatpak. Since Flatpak does not not allow network during building.

I manually download the archive and put the folder molecules and crystals inside avogadro/qtplugins/molecules and avogadro/qtplugins/crystals/

But it still trying to download molecules and crystals.

I believe this shows where the files will be downloaded, but I’m not sure where in the source file of avogadrolibs will it be.
What does /…/ mean in the directory?

Right now I have molecules and crystals folder like this.

drwxr-xr-x 1 kev users   250 Jun  3 23:19 avogadro
-rw-r--r-- 1 kev users  1604 Jun  3 23:19 AvogadroLibsConfig.cmake
-rw-r--r-- 1 kev users   535 Jun  3 23:19 AvogadroLibsConfigVersion.cmake
drwxr-xr-x 1 kev users    62 Jun  3 23:20 bin
drwxr-xr-x 1 kev users   766 Jun  3 04:02 cmake
-rw-r--r-- 1 kev users 35109 Jun  3 23:19 CMakeCache.txt
drwxr-xr-x 1 kev users   364 Jun  3 23:19 CMakeFiles
-rw-r--r-- 1 kev users  4207 Jun  3 23:19 cmake_install.cmake
-rw-r--r-- 1 kev users  4158 Jun  3 04:02 CMakeLists.txt
-rw-r--r-- 1 kev users  3233 Jun  3 04:02 CODE_OF_CONDUCT.md
-rw-r--r-- 1 kev users   894 Jun  3 04:02 CONTRIBUTING.md
drwxr-xr-x 1 kev users   412 Jun  3 23:19 crystals
-rw-r--r-- 1 kev users   254 Jun  3 04:02 CTestConfig.cmake
-rw-r--r-- 1 kev users   412 Jun  3 23:19 CTestCustom.cmake
drwxr-xr-x 1 kev users   298 Jun  3 04:02 docs
drwxr-xr-x 1 kev users   642 Jun  3 04:02 i18n
drwxr-xr-x 1 kev users   160 Jun  3 23:20 lib
-rw-r--r-- 1 kev users  1509 Jun  3 04:02 LICENSE
-rw-r--r-- 1 kev users 76180 Jun  3 23:19 Makefile
drwxr-xr-x 1 kev users   624 Jun  3 23:19 molecules
-rw-r--r-- 1 kev users    78 Jun  3 04:02 pyproject.toml
drwxr-xr-x 1 kev users   146 Jun  3 23:19 python
-rw-r--r-- 1 kev users  4795 Jun  3 04:02 README.md
drwxr-xr-x 1 kev users   190 Jun  3 04:02 scripts
-rw-r--r-- 1 kev users  1984 Jun  3 04:02 setup.py
-rw-r--r-- 1 kev users  5681 Jun  3 04:02 STYLE.md
drwxr-xr-x 1 kev users   102 Jun  3 04:02 tests
drwxr-xr-x 1 kev users   170 Jun  3 23:19 thirdparty
drwxr-xr-x 1 kev users   164 Jun  3 23:19 utilities

The build expects them in the top-level openchemistry directory, along with the avogenerators and avogadroapp repositories, etc.

I’ll bump openchemistry to include the imports.

(The Mac build has some issues too - you’re not alone.)

Hi,

Is there something to do with stamp file as well?
Like if stamp file does not exist, even if the file is there, it will not work.

There is a stamp file generated here.

avogadro/qtplugins/insertfragment/crystals-prefix/src/crystals-stamp/

Also, I’m not using the superbuild, I’m building avogadrolibs individually.

I don’t know - the code is looking for molecules in a level above the avogadrolibs source directory. If it finds it, it shouldn’t download anything (stamp or no stamp).

But I’m also not a CMake expert.

Do I need to create build directory for avogadrolib or just build it in the source dir?

I always create a build directory because I can then delete it whenever I need.

Hi,

I edit the avogadrolibs/avogadro/qtplugins/insertfragment/CMakeLists.txt from this

“${AvogadroLibs_SOURCE_DIR}/…/molecules”
“${AvogadroLibs_SOURCE_DIR}/…/crystals”

to this

“${AvogadroLibs_SOURCE_DIR}/molecules”
“${AvogadroLibs_SOURCE_DIR}/crystals”

Create patch for it.
And just put molecules and crystals inside avogadrolibs source dir.
I can build it now. Might the limitation of Flatpak to do something about file above the source dir. I don’t know.

I can also run Avogadro2 1.94.0 now.
But with cool looking transparent background for some reason.
The 1.93.0 version have black background, they are both build the same way.

1 Like

Older versions of Avogadro would set the background to be transparent when exporting an image.

Try setting the background color. It should set the background color to be opaque until “Export Graphics” is run. (And v. 1.94 finally remembers the background color you set.)

If not, … well, then there’s a bug.

Hi,

I got advice from flatpak groups, I just have to put avogadrolibs inside a folder and specify the dir that avogadrolibs is in. And just leave crystals and molecules folder as if they are on top.
No patch needed.
Like this.

  • avogadrolibs
    • avogadrolibs
      • cmakelists.txt
      • bla bla
    • molecules
    • crystals

Set background color work, thanks.
I will also be disabling build VTK 9.0.1 too, since avogadrolibs is not actually using it anyway.

Avogadro 1.94.0 Flatpak is ready, pr submitted.

1 Like