pemsley / coot

Software for macromolecular model-building
http://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/
GNU General Public License v3.0
121 stars 47 forks source link

preferences directory ~/.coot does not exist. Won't read preferences. #125

Open ElkeDeZitter opened 7 months ago

ElkeDeZitter commented 7 months ago

Hi,

I just installed Coot-1 on my Mac (macOS Monterey 12.7.4). I used the build-it script and then used brew to link it to /usr/local/bin/coot. When launching Coot, a black window is opened with header "Coot 1.0.06-pre (revision count 12910) but nothing else. I believe it might have to do something with the following message given in the terminal INFO:: preferences directory /Users/edezitter/.coot does not exist. Won't read preferences.

The full stdout is

/usr/local/bin/coot
debug:: file exists /usr/local/Cellar/coot/HEAD-45bbad7/share/coot/glade/a6.glade
DEBUG:: init_from_gtkbuilder(): glade file: /usr/local/Cellar/coot/HEAD-45bbad7/share/coot/glade/a6.glade add_from_file_status: 1
INFO:: GL Version:                  4.1 ATI-4.8.101
INFO:: GL Shading Language Version: 4.10
INFO:: GL Renderer:                 AMD Radeon Pro 460 OpenGL Engine
INFO:: GL Vendor:                   ATI Technologies Inc.
Shader compile         meshes-with-shadows.shader success
Shader compile           meshes-shadow-map.shader success
Shader compile             meshes-for-ssao.shader success
Shader compile     texture-meshes-for-ssao.shader success
Shader compile texture-meshes-with-shadows.shader success
Shader compile   texture-meshes-shadow-map.shader success
Shader compile              texture-meshes.shader success
Shader compile    shadow-map-image-texture.shader success
Shader compile             9.ssao_geometry.shader success
Shader compile                      9.ssao.shader success
Shader compile                 9.ssao_blur.shader success
Shader compile   outline-of-active-residue.shader success
Shader compile                         map.shader success
Shader compile                draw-map-cap.shader success
Shader compile                       model.shader success
Shader compile                central-cube.shader success
Shader compile                central-cube.shader success
Shader compile                    hud-text.shader success
Shader compile                    hud-bars.shader success
Shader compile                  hud-labels.shader success
Shader compile           hud-image-texture.shader success
Shader compile                  atom-label.shader success
Shader compile        moleculestotriangles.shader success
Shader compile                       lines.shader success
Shader compile                 lines-pulse.shader success
Shader compile                  rama-balls.shader success
Shader compile                   particles.shader success
Shader compile           instanced-objects.shader success
Shader compile   extra-distance-restraints.shader success
Shader compile   hud-geometry-tooltip-text.shader success
Shader compile             residue-markers.shader success
Shader compile    residue-markers-for-ssao.shader success
Shader compile                 ligand-view.shader success
Shader compile               model-as-mesh.shader success
Shader compile        symmetry-atoms-lines.shader success
Shader compile                    hud-bars.shader success
Shader compile    rama-plot-axes-and-ticks.shader success
Shader compile   rama-plot-phi-psi-markers.shader success
Shader compile                   hud-lines.shader success
Shader compile            background-image.shader success
Shader compile                      meshes.shader success
Shader compile              texture-meshes.shader success
Shader compile                     effects.shader success
Shader compile                      blur-x.shader success
Shader compile                      blur-y.shader success
Shader compile              depth-of-field.shader success
Shader compile rotation-centre-cross-hairs-for-ssao.shader success
Shader compile             9.ssao_geometry.shader success
Shader compile                      9.ssao.shader success
Shader compile                 9.ssao_blur.shader success
Coot Python Scripting GUI code found and loaded.
in safe_python_command_with_return() J 0x13f2b0b40
object 0x13f2b0b40
in safe_python_command_with_return() J 0x13f398bc0
INFO:: preferences directory /Users/edezitter/.coot does not exist. Won't read preferences.
---------------------------- on_window1_delete_event() ------------------
State file 0-coot-history.py written.
State file 0-coot-history.scm written.
--- framebuffer destructor - deleting framebuffer and textures "effects-framebuffer"
--- framebuffer destructor - deleting framebuffer and textures ""
--- framebuffer destructor - deleting framebuffer and textures ""
--- framebuffer destructor - deleting framebuffer and textures "SSAO-gBuffer-framebuffer"
--- framebuffer destructor - deleting framebuffer and textures "blur"
--- framebuffer destructor - deleting framebuffer and textures "new-blur"
--- framebuffer destructor - deleting framebuffer and textures "blur-y"
--- framebuffer destructor - deleting framebuffer and textures "blur-x"
--- framebuffer destructor - deleting framebuffer and textures "screen/occlusion"

Could you help me how to proceed to get the expected Coot-1 appearance and functions?

Thanks, Elke

pemsley commented 7 months ago

Hello @ElkeDeZitter

INFO:: preferences directory /Users/edezitter/.coot does not exist. Won't read preferences. is just an info message - not even a warning message really. For Coot 0.9.x, the $HOME/.coot was a file that could contain (scheme-based) configuration. It is not the cause of your problem. This is the first time I have seen the shaders compile and validate cleanly on macOS. That may be related to your graphics card and/or drivers. Interesting.

build-it script

Presumably you mean build-it-3-3 script.

/usr/local/Cellar/coot/HEAD-45bbad7/share/coot/glade/a6.glade Coot 1.0.06-pre (revision count 12910)

Oh! Something's going wrong. Maybe the wrong branch? It should be main.

Can you do a git log and check the git branch in the coot directory that the script created? You are on the cutting edge - sorry for the problems.

I imagine that most Mac users will use Homebrew to install Coot. See Issue 33 if you want to know more about that.

ElkeDeZitter commented 7 months ago

Hi @pemsley

Thank you very much for the fast response.

I see, I took a weird route to install Coot1. I downloaded https://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/source/releases/coot-1.1.03.tar.gz, unpacked it and started to follow the INSTALL notes. They start with the need to run the configure script and I bumped into the issue https://github.com/pemsley/coot/issues/78 where I saw that actually the build-it or build-it-3-3 should be used. I downloaded the script from https://raw.githubusercontent.com/pemsley/coot/refinement/build-it as described in the INSTALL notes. The script ran fine (I believe). It took me a while to find the executable since it was not locate in a usual place, but I only got the black screen upon launching it. Only afterwards, I found out that Mac OS users should install Coot1 via brew. Thus, I tried wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/coot.rb and brew install ./coot.rb --verbose --HEAD and I got the following return

Error: Failed to load cask: ./coot.rb
Cask 'coot' is unreadable: wrong constant name #<Class:0x000000010f8f2068>
Warning: Treating ./coot.rb as a formula.
Error: coot HEAD-45bbad7 is already installed

So while it is clear that it was unhappy about certain things, it seems to me that all was fine because I just installed it via the build-it script. I only had to use brew to link the executable to ```/usr/local/bin/coot````

However, it gets a bit more complicated. It appeared that I downloaded Coot1 already once in March 2023, but I didn't install it for some reason. So maybe, there was also a mix up with the old coot.rb file.

Since I downloaded a tar file not directly from git, I don't have a .git directory and I can't run a git log

I just unlinked all files again, removed everything, ran ``wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/coot.rbandbrew install ./coot.rb --verbose --HEAD. However, terminated with an errorError: coot HEAD-daa64f6 did not build``` I tried a few variations from issue https://github.com/pemsley/coot/issues/33#issuecomment-1806878065 but got the same results. I will need to take the time to get through the full issue since it is long to understand better what is happening and which fixes I can try.

pemsley commented 7 months ago

Ah, yes. I forgot when I wrote that, that the Homebrew builds are not working at the moment.

The homebrew log should tell you which line of which glm header is proving problematic. I believe that all I did was remove the "[[nodiscard]]" and the hombrew coot.rb build continued successfully.

It a bit of a frustration that glm and/or Homebrew have not yet solved this issue.

I am pleased that you want to try out Coot 1.1 and am happy to help, if needed, with any plug-in that you might write when you get it working.

ElkeDeZitter commented 7 months ago

Hi @pemsley

In the config.log file I couldn't find something about a problematic header and I also didn't understand everything from https://github.com/pemsley/coot/issues/33#issuecomment-1806878065. However, the log file said that glm was not found and that the path to glm.pc could be added to PKG_CONFIG_PATH:

configure: error: Package requirements (glm >= 0.9.9) were not met:

No package 'glm' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GLM_CFLAGS
and GLM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

So I tried a few things of which the addition of /usr/local/lib/pkgconfig/ to PKG_CONFIG_PATH and rerun the installation command brew install ./coot.rb --verbose --HEAD. Now, I get the Coot-1.x-pre interface. For some reason, sometimes the toolbar dropdown menu's (Edit, Calculate, Modelling, etc.) are not working at first. It seems that I first have to swicth to another application and then go back to Coot to activate them. A bit weird, but it works :-)

As described in https://github.com/pemsley/coot/issues/33#issuecomment-1806878065 some weird things can happen to the graphics. When I move Coot from one screen to another, the center seems lost the residues I ask for the Go To Atom are not centered (I actually don't know where to search for them, I think somewhere in the right upper corner), similar situation for the difference map peaks. Anyway, for now I can deal with that with keeping the Coot window on the screen where it opens.

For me now it is fine. I still mainly work in Coot 0.9.9, as most Xtrapol8 users. I'll reach back out to you if I'm facing too big issues with adapting our scripts in Coot1 as compared to Coot0 versions.

Thanks for the help!

pemsley commented 7 months ago

For some reason, sometimes the toolbar dropdown menu's (Edit, Calculate, Modelling, etc.) are not working at first. It seems that I first have to swicth to another application and then go back to Coot to activate them

This is fixed in Sonoma 14.1 (or 14.2 I forget which now).

The biggeset Pythonic difference is that Coot 1 uses the "coot" module for functions.

ElkeDeZitter commented 7 months ago

Ok, thanks. I will see it working as expected once I can update to Sonoma :-)