pemsley / coot

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

Suggestion: Homebrew formula for gtk3 (now GTK4) installation on macOS (or Linux) #33

Open YoshitakaMo opened 3 years ago

YoshitakaMo commented 3 years ago

Dear Paul Emsley,

I am a researcher in the field of bioinformatics, specifically structural biology. I'm interested in the Coot software and want to use it. For my own interest and for the convenience of other macOS users, I have created a Homebrew formula to install Coot-gtk3 from the source code by referring to build-3-3 autobuild script in the gtk3 branch.

To start the installation of Coot-Gtk3 on a macOS with Homebrew, run the following command on the terminal app:

# install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)

# install coot
brew install wget
wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/coot.rb
brew install ./coot.rb --verbose --HEAD

# Experimental (since May 14, 2024)
brew install yoshitakamo/bio2/coot

(May 14, 2024, Update the installation command. I provide coot bottles for macOS sonoma and Linux users)

(May 9, 2023, Update: Coot gtk3 now requires gtk 3.24.34, not the latest version. To use and pin it, see https://github.com/pemsley/coot/issues/33#issuecomment-1374409909)

I successfully installed Coot-Gtk3 on my macOS and open the Coot-Gtk3 app. However, it won't work completely with a lot of error messages error draw_central_cube() A err, as shown in the attached images.

pic1

pic2

Also, I tried to do another installation with the RDKit option (--with-enhanced-ligand-tools), but the installation failed due to a build error around it. If there is anything I should improve, I would like to know about it.

Since most Homebrew formulae can be also used by linuxbrew, this formula may be available on Linux OS, but I've never tested it yet.

I would like to thank @wgscott and @keitaroyam for their support in creating this Formula. I would like to complete this Homebrew Formula for Coot so that Coot users can easily get access to the latest functions.

pemsley commented 3 years ago

Hi YoshitakaMo, I just saw this. Usually the way to communicate with me is via email or the Coot mailing list. However, I see that Github is increasingly being use to communicate with me and I should read it more often.

Now, I think I have fixed the error draw_central_cube() bug. I think it is due to an Apple bug. I used a function that shouldn't produce but error does so.

It seems to me that your framebuffer is taking up one quarter of the GL widget (by width). I don't know why that should be. You could investigate by looking at the size of GL widget in on_glarea_resize() and changing framebuffer_scale.

Paul.

YoshitakaMo commented 2 years ago

Hi Paul, I'm sorry to neglect the reply for a long time.

I made an updated formula on https://gist.github.com/YoshitakaMo/d07056febca81fc2ca73c6f379fce4b0, and installed the Gtk3-Coot on Intel Mac (NOT M1 Mac) with the formula on this Jan 5 https://twitter.com/Ag_smith/status/1478567242749325314 . But today the installation failed on its ./configure step.

Here is the installation step using my Homebrew formulae.

# install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
# download coot.rb
wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/coot.rb -O coot.rb
# install coot
brew install ./coot.rb --verbose --HEAD --debug --keep-tmp

I think the old version of boost@1.74 and boost-python3@1.74 formulae are required because the latest boost made breaking changes.

Here, to get the coot.rb formula to work perfectly, I'd like to know that which build procedure is the best way to install. I'm reading https://github.com/pemsley/coot/blob/refinement/build-it now, but is it the best one? Or, it would be helpful if you could write the command to build it directly here.

I also found another potential obstacles to install Gtk3-Coot on any platform. libccp4 6.5.1 couldn't be built on M1 mac (See also https://github.com/brewsci/homebrew-bio/issues/1450 ). I have no idea how to solve it currently.

YoshitakaMo commented 2 years ago

Ah, I accidentally tried to build from the 'refinement' branch, not 'gtk3'. Now I've fixed the coot.rb and I successfully installed Gtk3-Coot on my Intel Mac with Homebrew. It takes about 10 minutes to install.

After the installation, boot Coot using this command /usr/local/opt/coot/libexec/coot-bin. Currently, /usr/local/opt/coot/bin/coot or coot won't work properly probably because its setting of PATH is not correct.

Thanks to the Coot community, libccp4 was successfully built on M1 Mac ( https://github.com/brewsci/homebrew-bio/issues/1450 ). I updated the Formula of libccp4. However, installation of Coot on M1 Mac has not been tested yet because boost-python@1.74 cannot be installed properly on it...

pemsley commented 2 years ago

I successfully installed Gtk3-Coot on my Intel Mac with Homebrew

Congratulations.

To test that the refinement works, click on the blue circle/sphere on the right and then click on 2 residues. You should be able to pull atoms around and see geometry "health bars" move.

because its setting of PATH is not correct

Where is the path not correct?

Most of the coot.in/coot script is to try to handle installation in an arbitrary directory - you don't need that so just use a "one-liner" to exec $libexec_prefix/coot-bin

keitaroyam commented 2 years ago

@YoshitakaMo Many thanks for the update. Finally I managed to install COOT, but the window looked like yours in the first post.

Here is my installation note which may be my environment specific. I am using macOS Catalina 10.15.7.

I followed your instruction:

# download Formula of boost@1.74 and boost-python3@1.74 first
brew install wget
wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/boost%401.74.rb
wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/boost-python3%401.74.rb
# install them
brew install ./boost@1.74.rb --verbose
brew install ./boost-python3@1.74.rb --verbose

Then an error occurred:

==> Cleaning
==> Finishing up
ln -s ../../Cellar/boost-python3@1.74/1.74.0/share/doc/boost-python3@1.74 boost-python3@1.74
ln -s ../../Cellar/boost-python3@1.74/1.74.0/lib/cmake/boost_numpy-1.74.0 boost_numpy-1.74.0
ln -s ../../Cellar/boost-python3@1.74/1.74.0/lib/cmake/boost_python-1.74.0 boost_python-1.74.0
rm /usr/local/lib/cmake/boost_numpy-1.74.0
rm /usr/local/lib/cmake/boost_python-1.74.0
rm /usr/local/share/doc/boost-python3@1.74
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/libboost_numpy39-mt.a
Target /usr/local/lib/libboost_numpy39-mt.a
is a symlink belonging to boost-python3. You can unlink it:
  brew unlink boost-python3

To force the link and overwrite all conflicting files:
  brew link --overwrite boost-python3@1.74

To list all files that would be deleted:
  brew link --overwrite --dry-run boost-python3@1.74

Possible conflicting files are:
/usr/local/lib/libboost_numpy39-mt.a -> /usr/local/Cellar/boost-python3/1.76.0/lib/libboost_numpy39-mt.a
/usr/local/lib/libboost_numpy39-mt.dylib -> /usr/local/Cellar/boost-python3/1.76.0/lib/libboost_numpy39-mt.dylib
/usr/local/lib/libboost_numpy39.a -> /usr/local/Cellar/boost-python3/1.76.0/lib/libboost_numpy39.a
/usr/local/lib/libboost_numpy39.dylib -> /usr/local/Cellar/boost-python3/1.76.0/lib/libboost_numpy39.dylib
/usr/local/lib/libboost_python39-mt.a -> /usr/local/Cellar/boost-python3/1.76.0/lib/libboost_python39-mt.a
/usr/local/lib/libboost_python39-mt.dylib -> /usr/local/Cellar/boost-python3/1.76.0/lib/libboost_python39-mt.dylib
/usr/local/lib/libboost_python39.a -> /usr/local/Cellar/boost-python3/1.76.0/lib/libboost_python39.a
/usr/local/lib/libboost_python39.dylib -> /usr/local/Cellar/boost-python3/1.76.0/lib/libboost_python39.dylib
==> Summary
🍺  /usr/local/Cellar/boost-python3@1.74/1.74.0: 472 files, 18.5MB, built in 7 minutes 29 seconds
==> Running `brew cleanup boost-python3@1.74`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Error: Could not get runtime dependencies from /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtkglext.rb!
Error: gtk+: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb:86: syntax error, unexpected <<, expecting ']'
<<<<<<< Updated upstream
^~
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb:87: syntax error, unexpected ',', expecting end
... "--with-gdktarget=#{backend}",
...                              ^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb:88: syntax error, unexpected ']', expecting end
...        "--disable-visibility"]
...                              ^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb:92: syntax error, unexpected ',', expecting end
        "--with-gdktarget=x11",
                              ^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb:94: syntax error, unexpected ']', expecting end
           ]
           ^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb:108: syntax error, unexpected do (for lambda), expecting end
  test do
       ^~
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb:162: syntax error, unexpected do (for lambda), expecting end
    on_macos do
             ^~
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb:167: syntax error, unexpected end, expecting end-of-input
  end
  ^~~

/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gtk+.rb looked like

  def install
    args = ["--disable-dependency-tracking",
            "--disable-silent-rules",
            "--prefix=#{prefix}",
            "--enable-static",
            "--disable-glibtest",
            "--enable-introspection=yes",
<<<<<<< Updated upstream
            "--with-gdktarget=#{backend}",
            "--disable-visibility"]
=======
            #"--with-gdktarget=quartz",
            #"--disable-visibility"
            "--with-gdktarget=x11",
            "--enable-x11-backend"
           ]
>>>>>>> Stashed changes

So I ran following command

brew unlink boost-python3
brew link --overwrite boost-python3@1.74
brew update-reset

and finally

# install coot
wget https://gist.githubusercontent.com/YoshitakaMo/d07056febca81fc2ca73c6f379fce4b0/raw/6b6838c9aa5790b963327e8482101c8153687b41/coot.rb
brew install ./coot.rb --verbose --HEAD --debug --keep-tmp

with success.

As @YoshitakaMo mentioned, /usr/local/bin/coot failed. I changed

if [ $systype = Darwinx ] ; then
    COOT_PREFIX="$(cd "$(dirname "$current_exe_dir")" 2>/dev/null && pwd)"
else
    unlinked_exe=$(readlink -f $0)
    unlinked_exe_dir=$(dirname $unlinked_exe)
    COOT_PREFIX=$(dirname $unlinked_exe_dir)
fi

to

unlinked_exe=$(readlink -f $0)
unlinked_exe_dir=$(dirname $unlinked_exe)
COOT_PREFIX=$(dirname $unlinked_exe_dir)

but then following error occurred:

Python path configuration:
  PYTHONHOME = '/usr/local/Cellar/coot/HEAD-18202fe'
  PYTHONPATH = (not set)
  program name = 'python3'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/usr/local/Cellar/coot/HEAD-18202fe/libexec/coot-bin'
  sys.base_prefix = '/usr/local/Cellar/coot/HEAD-18202fe'
  sys.base_exec_prefix = '/usr/local/Cellar/coot/HEAD-18202fe'
  sys.platlibdir = 'lib'
  sys.executable = '/usr/local/Cellar/coot/HEAD-18202fe/libexec/coot-bin'
  sys.prefix = '/usr/local/Cellar/coot/HEAD-18202fe'
  sys.exec_prefix = '/usr/local/Cellar/coot/HEAD-18202fe'
  sys.path = [
    '/usr/local/Cellar/coot/HEAD-18202fe/lib/python39.zip',
    '/usr/local/Cellar/coot/HEAD-18202fe/lib/python3.9',
    '/usr/local/Cellar/coot/HEAD-18202fe/lib/python3.9/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00000001122d6dc0 (most recent call first):
<no Python frame>
. ------ Coot crashed - trying to diagnose -----

I was able to start COOT from /usr/local/opt/coot/libexec/coot-bin, but map and model were displayed at the bottom left and I could not select atoms properly.

pemsley commented 2 years ago

I was able to start COOT from /usr/local/opt/coot/libexec/coot-bin, but map and model were displayed at the bottom left and I could not select atoms properly.

Indeed! I was wondering how @YoshitakaMo made that work because I don't think that I have pushed the fix yet.

keitaroyam commented 2 years ago

So you have fixed it but not yet pushed?

pemsley commented 2 years ago

So you have fixed it but not yet pushed?

It was not pushed because it was not coded up with on-Mac-only test. I intend to make an update shortly - but it might be more complicated than I hope.

pemsley commented 2 years ago

I have pushed a simple-minded fix for the widget size vs framebuffer size problem (by by-passing the AO framebuffer). But it is not the same one that @YoshitakaMo has used because you can see in the twitter video that his version still uses the AO framebuffer.

keitaroyam commented 2 years ago

I upgraded COOT to 050e7dd352272c337d7df2d52415e83816b885d0 (not knowing if this is the right way)

brew upgrade ./coot.rb --verbose --fetch-HEAD --debug --keep-tmp

and it worked so nicely!

..until I resized the window.

Screenshot 2022-02-06 at 12 39 53
pemsley commented 2 years ago

Hmm.. Please use the argument --gtkbuilder In order to get the Python gui working I need to setenv GI_TYPELIB_PATH /usr/lib/x86_64-linux-gnu/girepository-1.0 For you that will be somewhat different of course.

keitaroyam commented 2 years ago

What is this option for?

pemsley commented 2 years ago

What is this option for?

With --gtkbuilder the gui is generated (on the fly) from the builder/glade file, not from the ancient gtk2-interface.c - it's a large code path difference and may (well) affect what you are seeing.

keitaroyam commented 2 years ago

So is it an option of configure? Nothing seems to have changed..

pemsley commented 2 years ago

So is it an option of configure? Nothing seems to have changed..

It's an argument to coot - sorry that that was not clear.

keitaroyam commented 2 years ago

OK thanks. The appearance has changed a bit, but the resizing problem remains the same.

blake-riley commented 2 years ago

Yep, I can confirm that the resizing problem remains on macOS

Coot 1.0 (commit e55c6b9) macOS Big Sur 11.5.2 (a bit out of date), Intel, 27" iMac

https://user-images.githubusercontent.com/4962663/161349884-f9bfc729-4072-4b57-8b05-21fc48c356ca.mp4

I hope this video helps you identify where the issue might be in the code?

YoshitakaMo commented 2 years ago

I'm happy to hear that Coot 1 has been released. However, this Homebrew Formula was developed before the release and I haven't tested yet for the latest version. The window-resize issue on macOS is a known bug, but I've not found the solution yet. I will rebuild the Homebrew Formula for Coot 1 when I have time.

pemsley commented 2 years ago

Hi Blake, can you try a couple of things for me? What happens when you are "Plain" render mode? (Edit → Shader Preferences) and try to resize? Try turning on the FPS meter (under Draw menu). Thanks.

pemsley commented 2 years ago

The window-resize issue on macOS is a known bug, but I've not found the solution yet.

The problem is in graphics_info_t::reset_frame_buffers(). From the looks of things (the video from blake-riley), this is being called before attach_buffers() has been called. It might be a "OpenGL in GTK on Mac OS" bug (but probably is a problem in my code).

In "Plain" render mode it seems that reset_frame_buffers() is using the wrong dimensions.

blake-riley commented 2 years ago

More pixels, more time to draw a frame. Ultimately, the resizing still suffers from the same "misdimensioning" (though it initially starts at a 1/2w, 1/2h scale factor). I'd hazard a guess that this is to do with the 2x DPI on Macs with Retina displays.

Here's another video (so you can check out the FPS meter): https://user-images.githubusercontent.com/4962663/161405017-9a697637-02e8-477c-9dbf-be7455b9ef05.mp4

biochem-fan commented 2 years ago

Resize issue:

On my Mac Book Pro Retina, the scale factor is 1.

After the graphics is messed up, I can recover by clicking the top part of the window where you would have menus (even if the menu is invisible in the screwed up window).

YoshitakaMo commented 2 years ago

Hi, I'm aware there may be a lot of people waiting for a one-liner installation using Homebrew.
https://www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=ind2204&L=COOT&O=D&X=329C65F4D20514F6D5&P=3586 I'm trying the installation in M1 Mac. But, as reported in the mailing list, the installation of FFTW2 (required for clipper) failed.

$ ./configure --prefix=/opt/homebrew/Cellar/clipper4coot/2.1.20180802_1/fftw2 --enable-shared --enable-float --disable-static
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking type prefix for installed files... (none)
checking for vendor's cc to be used instead of gcc... checking for cc... cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking whether we are using gcc 2.90 or later... yes
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking whether ln -s works... yes
checking build system type... configure: error: /bin/sh ./config.sub -apple-darwin21.4.0 failed

I guess the ./configure failed to detect the machine environment. Could anyone tell me how to solve this issue?

huwjenkins commented 2 years ago

Is this and this fix any help? I don't have access to a M1 Mac to test.

pemsley commented 2 years ago

I'm trying the installation in M1 Mac. But, as reported in the mailing list, the installation of FFTW2 (required for clipper) failed.

$ ./configure --prefix=/opt/homebrew/Cellar/clipper4coot/2.1.20180802_1/fftw2 --enable-shared --enable-float --disable-static
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking type prefix for installed files... (none)
checking for vendor's cc to be used instead of gcc... checking for cc... cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking whether we are using gcc 2.90 or later... yes
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking whether ln -s works... yes
checking build system type... configure: error: /bin/sh ./config.sub -apple-darwin21.4.0 failed

I guess the ./configure failed to detect the machine environment. Could anyone tell me how to solve this issue?

Curious that blake-riley didn't have the same problem:

https://github.com/pemsley/coot/issues/38

YoshitakaMo commented 2 years ago

@huwjenkins, Thanks! Patches of https://sources.debian.org/patches/fftw/2.1.5-6/ (especially "05_ac_define_syntax.diff") and autoreconf -vfi command enabled the installation on M1 Mac! I'll rebuild brewsci/bio/clipper4coot.rb after some additional tests.

blake-riley commented 2 years ago

Sorry for not mentioning it. I threw in

args << "--build=arm-apple-#{OS.kernel_name.downcase}#{OS.kernel_version.major}" if Hardware::CPU.arm? && OS.mac?

to clipper4coot.rb (ahead of the ./configure step). Clearly hacky. autoreconf seems like the way to go, @YoshitakaMo .

blake-riley commented 2 years ago

FWIW I was also able to drop the depends_on "xcode" from all the recipes. I'm not sure why it's necessary for building, though I could be missing something. (Edit: it appears that this is now known)

Species10C commented 2 years ago

Hi All

Im just documenting here what I wrote on Twitter: https://twitter.com/klausenhauser/status/1510655605115179010?s=20&t=KOufKUDc17tJGqIkQXZvzQ

I am on a Macbook Pro, Intel, running Big Sur 12.3.1.

I am for sure not an expert in any of this, but I could make out most of what I see on here.

I followed @YoshitakaMo original commands

Here is the installation step using my Homebrew formulae.


# download Formula of boost@1.74 and boost-python3@1.74 first
brew install wget
wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/boost%401.74.rb
wget https://raw.githubusercontent.com/YoshitakaMo/homebrew-bio/coot/Formula/boost-python3%401.74.rb
# install them
brew install ./boost@1.74.rb --verbose
brew install ./boost-python3@1.74.rb --verbose
# install coot
wget https://gist.githubusercontent.com/YoshitakaMo/d07056febca81fc2ca73c6f379fce4b0/raw/6b6838c9aa5790b963327e8482101c8153687b41/coot.rb
brew install ./coot.rb --verbose --HEAD --debug --keep-tmp

Everything up to the final brew install for coot was completely A-OK for me.

During COOT installation I ran into an error in which I ignored.

Screenshot 2022-04-03 at 17 59 09

After the ignore, everything seemed to be successful but under /usr/local/opt/coot/libexec/, coot-bin does not exist.

I tried to brew reinstall coot but then I get the following:

Error: An exception occurred within a child process:
  FormulaUnavailableError: No available formula with the name "/usr/local/opt/coot/.brew/coot.rb".
blake-riley commented 2 years ago

@Species10C: there is a race condition in make install, it needs to be run in an ENV.deparallelize in the recipe. When you ignored this error, you hadn't finished moving compiled files into their install directories, and you skipped right ahead. This is why you can't find coot-bin. To fix it, I think (could be wrong) you will have to first brew rm coot, and then you should be back to an unbroken state, from which you can reinstall.

blake-riley commented 2 years ago

I've made my fork of coot.rb public now. Note, this is very much a WIP: I will be force-pushing and doing (un)godly git things to my branch, until it's ready for a PR. Yoshitaka, Keitaro, biochem-fan or others may get there first.

pemsley commented 2 years ago

there is a race condition in make install

@Species10C @blake-riley That's more or less what I see too - there is a race condition in the src directory. Something tries to link against libcootsumo before libcootsumo has been built. I don't know what the cause is. It is not homebrew-specific.

I just type make again and it works.

biochem-fan commented 2 years ago

To investigate the resize bug and the quarter graphics bug in Simple and Plain rendering modes, I first looked at a simpler GtkGLArea example in https://github.com/ebassi/glarea-example (you have to change the GLSL version to 410; see https://github.com/ebassi/glarea-example/issues/9). This toy example has the same issue as Coot, indicating that the problem is in GTK, not Coot itself.

Messed up screen after resizing:

image

Quater rendering (this happens when the window is moved from the main Retina display into an external 1920x1080 monitor): image

I will try to find a workaround in this simpler program and then apply it to Coot.

pemsley commented 2 years ago

@biochem-fan I have been in touch with @chergert and he tells me that "GTK 3 is notorious for oddities on macOS." The way forward therefore, it seems to me, is to port to GTK4.

blake-riley commented 2 years ago

I'm waaaay out of my depth when it comes to OpenGL stuff, but the quarter display seems to be a common issue, that started with macOS 10.15 Catalina---something changed in the way macOS reports the scaling factor on Retina displays.

Official docs might hint at something. Good luck, I think?

biochem-fan commented 2 years ago

A relevant discussion: https://gitlab.gnome.org/GNOME/gtk/-/issues/1298 See also https://github.com/horizon-eda/horizon/issues/271.

YoshitakaMo commented 2 years ago

Now I'm fixing brewsci/bio/raster3d, libccp4, and clipper4coot Formulae to drop xcode and gcc@9 dependencies. After that, I'll try the installation again with @blake-riley's coot.rb.

biochem-fan commented 2 years ago

Hmm, on BigSur, my workaround above (clicking the menu after resizing) does not reset the screen.

pemsley commented 2 years ago

As a work-around for the resizing, you can specify the target size in a command line script file $ coot --script startup.py where startup.py is:

import coot
coot.set_graphics_window_size(1400, 1000)
pemsley commented 2 years ago

A relevant discussion: https://gitlab.gnome.org/GNOME/gtk/-/issues/1298 See also horizon-eda/horizon#271.

Interesting reading, I guess that that was what Christian Hergert meant. It reaffirms the plan of porting to GTK4.

biochem-fan commented 2 years ago

As far as I can see by putting many printfs, the client code gets the right dimensions. The problem seems to be in Gdk, not even Gtk.

Did anybody try to build Coot against non-native GTK on Mac OS? I mean, GTK for X11.

YoshitakaMo commented 2 years ago

@blake-riley @pemsley Is this the race condition you mentioned? I sometimes encountered 'g_triangle.hh' file not found.

/bin/sh ../libtool  --tag=CXX   --mode=compile clang++ -DPACKAGE_NAME=\"coot\" -DPACKAGE_TARNAME=\"coot\" -DPACKAGE_VERSION=\"1\" -DPACKAGE_STRING=\"coot\ 1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"coot\" -DVERSION=\"1\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_CXX11=1 -DHAVE_CXX_THREAD=1 -DHAVE_PYTHON=\"3.9\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_PYTHON=/\*\*/ -I.  -DUSE_PYTHON -I.. "-I/usr/local/opt/rdkit/include/rdkit -DRDKIT_HAS_CAIRO_SUPPORT" -DRDKIT_HAS_CAIRO_SUPPORT -I/usr/local/opt/boost/include  -DHAVE_SYS_STDTYPES_H=0       -I/private/tmp/coot-20220404-90009-1ilrm2p/coot-1/.brew_home/glm/include -DCOOT_USE_GTK2_INTERFACE   -I/usr/local/Cellar/libffi/3.4.2/include -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.14.0/include -I/usr/local/Cellar/pcre/8.45/include -I/usr/local/Cellar/glib/2.72.0/include/gio-unix-2.0 -I/usr/local/Cellar/glib/2.72.0/include -I/usr/local/Cellar/glib/2.72.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.72.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libxau/1.0.9/include -I/usr/local/Cellar/libxdmcp/1.1.3/include -I/usr/local/Cellar/libxcb/1.14_2/include -I/usr/local/Cellar/libx11/1.7.3.1/include -I/usr/local/Cellar/libxext/1.3.4/include -I/usr/local/Cellar/libxrender/0.9.10/include -I/usr/local/Cellar/pixman/0.40.0/include/pixman-1 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/jpeg/9e/include -I/usr/local/Cellar/libtiff/4.3.0/include -I/usr/local/Cellar/gdk-pixbuf/2.42.8/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/fribidi/1.0.11/include/fribidi -I/usr/local/Cellar/graphite2/1.3.14/include -I/usr/local/Cellar/harfbuzz/4.2.0/include/harfbuzz -I/usr/local/Cellar/pango/1.50.6/include/pango-1.0 -I/usr/local/Cellar/atk/2.38.0/include/atk-1.0 -I/usr/local/Cellar/libepoxy/1.5.10/include -I/usr/local/Cellar/gtk+3/3.24.33/include/gtk-3.0 -I/usr/local/Cellar/goocanvas/2.0.4_2/include/goocanvas-2.0 -I/usr/local/Cellar/xorgproto/2021.5/include -I/usr/local/Cellar/libffi/3.4.2/include -I/usr/local/Cellar/libpng/1.6.37/include/libpng16 -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/fontconfig/2.14.0/include -I/usr/local/Cellar/pcre/8.45/include -I/usr/local/Cellar/glib/2.72.0/include/gio-unix-2.0 -I/usr/local/Cellar/glib/2.72.0/include -I/usr/local/Cellar/glib/2.72.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.72.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/libxau/1.0.9/include -I/usr/local/Cellar/libxdmcp/1.1.3/include -I/usr/local/Cellar/libxcb/1.14_2/include -I/usr/local/Cellar/libx11/1.7.3.1/include -I/usr/local/Cellar/libxext/1.3.4/include -I/usr/local/Cellar/libxrender/0.9.10/include -I/usr/local/Cellar/pixman/0.40.0/include/pixman-1 -I/usr/local/Cellar/cairo/1.16.0_5/include/cairo -I/usr/local/Cellar/jpeg/9e/include -I/usr/local/Cellar/libtiff/4.3.0/include -I/usr/local/Cellar/gdk-pixbuf/2.42.8/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/fribidi/1.0.11/include/fribidi -I/usr/local/Cellar/graphite2/1.3.14/include -I/usr/local/Cellar/harfbuzz/4.2.0/include/harfbuzz -I/usr/local/Cellar/pango/1.50.6/include/pango-1.0 -I/usr/local/Cellar/atk/2.38.0/include/atk-1.0 -I/usr/local/Cellar/libepoxy/1.5.10/include -I/usr/local/Cellar/gtk+3/3.24.33/include/gtk-3.0 -I/usr/local/Cellar/xorgproto/2021.5/include   -I/usr/local/Cellar/mmdb2/2.0.20_1/include -I/usr/local/Cellar/ssm/1.4/include -DHAVE_SSMLIB -I/usr/local/Cellar/mmdb2/2.0.20_1/include -DMMDB_HAS_LINK_DISTANCE  -I/usr/local/Cellar/gsl/2.7.1/include -D_THREAD_SAFE -pthread -I/usr/local/Cellar/libccp4/542516076_1/include -I/usr/local/Cellar/mmdb2/2.0.20_1/include -I/usr/local/Cellar/clipper4coot/2.1.20180802_1/include -DCLIPPER_HAS_TOP8000     -DUSE_SQLITE3 -I/usr/local/Cellar/sqlite/3.38.2/include  -I/usr/local/opt/clipper4coot/fftw2/include -I/usr/local/opt/clipper4coot/fftw2/include -I/usr/local/opt/rdkit/include/rdkit -DPKGDATADIR='"/usr/local/Cellar/coot/1/share/coot"' -DPACKAGE_LOCALE_DIR='"/usr/local/Cellar/coot/1/share/coot/locale"' -DPKGPYTHONDIR='"/usr/local/Cellar/coot/1/lib/python3.9/site-packages/coot"' -DPYTHONDIR='"/usr/local/Cellar/coot/1/lib/python3.9/site-packages"' -DDATADIR='"/usr/local/Cellar/coot/1/share"' -DCOOT_SYS_BUILD_TYPE='"Darwin-MacOSX-11.6.4-x86_64gtk3"' -DCOOT_BUILD_INFO_STRING='""' -DUSE_LIBCURL -DHAVE_SYS_STDTYPES_H=0    -I/private/tmp/coot-20220404-90009-1ilrm2p/coot-1/.brew_home/python-3.8/lib/python3.8/site-packages/PyGObject-3.36.1-py3.8-macosx-11.5-x86_64.egg/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9   -DHAVE_GSL  -g -O2 -Wall -Wno-unused  -std=c++11 -MT c-interface-database.lo -MD -MP -MF .deps/c-interface-database.Tpo -c -o c-interface-database.lo c-interface-database.cc
In file included from glade-callbacks-main-window.cc:60:
In file included from ./graphics-info.h:79:
In file included from ./molecule-class-info.h:80:
In file included from ./coot-render.hh:15:
In file included from ./meshed-generic-display-object.hh:12:
./Mesh.hh:10:10: fatal error: 'g_triangle.hh' file not found
#include "g_triangle.hh"
         ^~~~~~~~~~~~~~~

Additionally, a drastic change may be required to rebuild clipper4coot.rb because the current homebrew-bio CI won't accept internal fftw2 compilation. Now I'm seeking for a workaround.

pemsley commented 2 years ago

@YoshitakaMo @blake-riley I should have fixed the g_triangle.hh issue in 8a550246932a864c9e893ec87eae6ba00787e637 (i.e. in 1.0.01-pre).

pemsley commented 2 years ago

Did anybody try to build Coot against non-native GTK on Mac OS? I mean, GTK for X11.

Not to completion, as far as i know.

biochem-fan commented 2 years ago

If migration to GTK4 is not too hard and GTK4 actually fixes the GLarea issue (which I doubt), it is the way to go. But otherwise, trying GTK for X11 would be the next step. Many Mac users have XQuartz anyway.

Species10C commented 2 years ago

@Species10C: there is a race condition in make install, it needs to be run in an ENV.deparallelize in the recipe. When you ignored this error, you hadn't finished moving compiled files into their install directories, and you skipped right ahead. This is why you can't find coot-bin. To fix it, I think (could be wrong) you will have to first brew rm coot, and then you should be back to an unbroken state, from which you can reinstall.

brew rm coot works great

I then reinstalled. This time for whatever reason I ran into new errors at all.

It is a pleasure to announce I have it running, however, Im running into the same issues as the rest of you all.

  1. Withour resizing, coot opens on my Retina display but the model is already weird. Map however looks nice. Same bug if I open on my external.
  2. The moment I resize it seems to be the issues the rest are having. The same if I resize on external monitor
  3. My mouse commands do not seem to work completely properly. Can change contours (middle mouse), can move, but cannot Zoom

Screenshot 2022-04-04 at 10 26 55

Screenshot 2022-04-04 at 10 26 30

https://user-images.githubusercontent.com/102914854/161505709-7f9b343c-7e81-4f58-991a-227d4ebba0ba.mov

https://user-images.githubusercontent.com/102914854/161505753-c5f0a4e2-54d6-4a41-b8f9-13054f13ceb1.mov

This was the output of my terminal after executing coot-bin:

problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading bond mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading link torsion mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading link plane mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
problem reading bond mmCIFLoop
oops in add_chem_mod_plane ierr_tot is -4
oops in add_chem_mod_plane ierr_tot is -4
oops in add_chem_mod_plane ierr_tot is -4
oops in add_chem_mod_plane ierr_tot is -4
DEBUG:: setting OpenGL required version to 3 3

(coot-bin:90261): Gtk-WARNING **: 10:46:45.210: Error loading theme icon 'edit-clear' for stock: 

(coot-bin:90261): Gtk-WARNING **: 10:46:45.211: Error loading theme icon 'edit-delete' for stock: Icon 'edit-delete' not present in theme Adwaita

(coot-bin:90261): Gtk-WARNING **: 10:46:45.215: Error loading theme icon 'media-playback-start' for stock: 

(coot-bin:90261): Gtk-WARNING **: 10:46:45.234: Error loading theme icon 'edit-clear' for stock: 

(coot-bin:90261): Gtk-WARNING **: 10:46:45.234: Error loading theme icon 'edit-delete' for stock: Icon 'edit-delete' not present in theme Adwaita

(coot-bin:90261): Gtk-WARNING **: 10:46:45.236: Error loading theme icon 'media-playback-start' for stock: 
INFO:: GL Version:                  4.1 INTEL-18.5.8
INFO:: GL Shading Language Version: 4.10
INFO:: GL Renderer:                 Intel(R) Iris(TM) Plus Graphics 655
INFO:: GL Vendor:                   Intel Inc.
WARNING:: valiation failed: meshes-with-shadows.shader validation status 0
Shader compile         meshes-with-shadows.shader validation-failed
WARNING:: valiation failed: meshes-shadow-map.shader validation status 0
Shader compile           meshes-shadow-map.shader validation-failed
WARNING:: valiation failed: meshes-for-ssao.shader validation status 0
Shader compile             meshes-for-ssao.shader validation-failed
WARNING:: valiation failed: texture-meshes-for-ssao.shader validation status 0
Shader compile     texture-meshes-for-ssao.shader validation-failed
WARNING:: valiation failed: texture-meshes-with-shadows.shader validation status 0
Shader compile texture-meshes-with-shadows.shader validation-failed
WARNING:: valiation failed: texture-meshes-shadow-map.shader validation status 0
Shader compile   texture-meshes-shadow-map.shader validation-failed
WARNING:: valiation failed: texture-meshes.shader validation status 0
Shader compile              texture-meshes.shader validation-failed
WARNING:: valiation failed: shadow-map-image-texture.shader validation status 0
Shader compile    shadow-map-image-texture.shader validation-failed
WARNING:: valiation failed: 9.ssao_geometry.shader validation status 0
Shader compile             9.ssao_geometry.shader validation-failed
WARNING:: valiation failed: 9.ssao.shader validation status 0
Shader compile                      9.ssao.shader validation-failed
WARNING:: valiation failed: 9.ssao_blur.shader validation status 0
Shader compile                 9.ssao_blur.shader validation-failed
WARNING:: valiation failed: outline-of-active-residue.shader validation status 0
Shader compile   outline-of-active-residue.shader validation-failed
WARNING:: valiation failed: map.shader validation status 0
Shader compile                         map.shader validation-failed
WARNING:: valiation failed: draw-map-cap.shader validation status 0
Shader compile                draw-map-cap.shader validation-failed
WARNING:: valiation failed: model.shader validation status 0
Shader compile                       model.shader validation-failed
WARNING:: valiation failed: central-cube.shader validation status 0
Shader compile                central-cube.shader validation-failed
WARNING:: valiation failed: central-cube.shader validation status 0
Shader compile                central-cube.shader validation-failed
WARNING:: valiation failed: hud-text.shader validation status 0
Shader compile                    hud-text.shader validation-failed
WARNING:: valiation failed: hud-bars.shader validation status 0
Shader compile                    hud-bars.shader validation-failed
WARNING:: valiation failed: hud-labels.shader validation status 0
Shader compile                  hud-labels.shader validation-failed
WARNING:: valiation failed: hud-image-texture.shader validation status 0
Shader compile           hud-image-texture.shader validation-failed
WARNING:: valiation failed: atom-label.shader validation status 0
Shader compile                  atom-label.shader validation-failed
WARNING:: valiation failed: moleculestotriangles.shader validation status 0
Shader compile        moleculestotriangles.shader validation-failed
WARNING:: valiation failed: lines.shader validation status 0
Shader compile                       lines.shader validation-failed
WARNING:: valiation failed: lines-pulse.shader validation status 0
Shader compile                 lines-pulse.shader validation-failed
WARNING:: valiation failed: rama-balls.shader validation status 0
Shader compile                  rama-balls.shader validation-failed
WARNING:: valiation failed: particles.shader validation status 0
Shader compile                   particles.shader validation-failed
WARNING:: valiation failed: instanced-objects.shader validation status 0
Shader compile           instanced-objects.shader validation-failed
WARNING:: valiation failed: hud-geometry-tooltip-text.shader validation status 0
Shader compile   hud-geometry-tooltip-text.shader validation-failed
WARNING:: valiation failed: happy-face-residue-markers.shader validation status 0
Shader compile  happy-face-residue-markers.shader validation-failed
WARNING:: valiation failed: ligand-view.shader validation status 0
Shader compile                 ligand-view.shader validation-failed
WARNING:: valiation failed: model-as-mesh.shader validation status 0
GL ERROR:: Shader::Use() "model-as-mesh.shader" err 1282 for program_id 94
GL ERROR:: set_uniform_locations() error 1: 1282
GL ERROR:: set_uniform_locations() error 2: 1282
GL ERROR:: set_uniform_locations() error 3: 1282
GL ERROR:: set_uniform_locations() error 4: 1282
Shader compile               model-as-mesh.shader validation-failed
WARNING:: valiation failed: symmetry-atoms-lines.shader validation status 0
Shader compile        symmetry-atoms-lines.shader validation-failed
WARNING:: valiation failed: hud-bars.shader validation status 0
Shader compile                    hud-bars.shader validation-failed
WARNING:: valiation failed: rama-plot-axes-and-ticks.shader validation status 0
Shader compile    rama-plot-axes-and-ticks.shader validation-failed
WARNING:: valiation failed: rama-plot-phi-psi-markers.shader validation status 0
Shader compile   rama-plot-phi-psi-markers.shader validation-failed
WARNING:: valiation failed: hud-lines.shader validation status 0
Shader compile                   hud-lines.shader validation-failed
WARNING:: valiation failed: meshes.shader validation status 0
Shader compile                      meshes.shader validation-failed
WARNING:: valiation failed: texture-meshes.shader validation status 0
Shader compile              texture-meshes.shader validation-failed
WARNING:: valiation failed: effects.shader validation status 0
Shader compile                     effects.shader validation-failed
WARNING:: valiation failed: screen.shader validation status 0
Shader compile                      screen.shader validation-failed
WARNING:: valiation failed: blur-x.shader validation status 0
Shader compile                      blur-x.shader validation-failed
WARNING:: valiation failed: blur-y.shader validation status 0
Shader compile                      blur-y.shader validation-failed
WARNING:: valiation failed: depth-of-field.shader validation status 0
Shader compile              depth-of-field.shader validation-failed
WARNING:: valiation failed: blur.shader validation status 0
Shader compile                        blur.shader validation-failed
WARNING:: valiation failed: rotation-centre-cross-hairs-for-ssao.shader validation status 0
Shader compile rotation-centre-cross-hairs-for-ssao.shader validation-failed
GL ERROR:: --------------------------------- ooops Use() called for unset Shader 
Shader compile             9.ssao_geometry.shader success
Shader compile                      9.ssao.shader success
Shader compile                 9.ssao_blur.shader success
debug:: generating 64 SSAO kernel samples
Coot Python Scripting GUI code found and loaded.
INFO:: GtkGLArea widget dimensions 1800 1474
pemsley commented 2 years ago

@Species10C An interesting array of assorted problems! The mmcif loop things might be due to the wrong monomer library being used - or the (below) language-based parsing. I think you can use the environment variable COOT_REFMAC_LIB_DIR to point to an alternative one. Please turn on the Draw -> FPS meter for screen grab videos. The disconneced atoms is due to language-based parsing of the PDB file I think. Try exporting these: LANG=C LC_ALL=C LC_NUMERIC=C before starting up coot.

pemsley commented 2 years ago

I tried compiling with GTK4. 335 compilation errors. That's an order of magnitude less than the initial GTK3 port.

Species10C commented 2 years ago

@pemsley

Thanks for watching.

  1. I turned on FPS, attached is a new video. I tried to also do some refinements near the end, I get the Rama plot, but no points. (see video)

https://user-images.githubusercontent.com/102914854/161525389-dbcb076b-0aa2-474c-9a15-8a70a52f4219.mp4

  1. I dont undestand your comment about exporting LANG=C LC_ALL=C and LC_NUMERIC=C

  2. I also tried opening up a .pdb and an .MTZ (I get an error there too). Opening in Coot 0.96 is fine. (see screenshot as well)

INFO:: Reading coordinate file: /Users/kelvinlau/Desktop/1/Demo-Avidin-2022_refine_21.pdb
INFO:: file /Users/kelvinlau/Desktop/1/Demo-Avidin-2022_refine_21.pdb has been read.
INFO:: comp-id: LIG is marked for non-autoloading - stopping now
INFO:: Found 1 models
   Model 1 had 3 links
INFO:: NCS chain comparison 122/123
INFO:: NCS chain comparison 122/123
INFO:: NCS chain comparison 123/123
  INFO:: fill_ghost_info Constructed 3 ghosts
      Ghost 0 name: "NCS found from matching Chain B onto Chain A"
      Ghost 1 name: "NCS found from matching Chain C onto Chain A"
      Ghost 2 name: "NCS found from matching Chain D onto Chain A"
debug:: plain make_bonds_type_checked() --------start--------- called by handle_read_draw_molecule() with is_intermediate_atoms_molecule: 0
--- make_bonds_type_checked() called with bonds_box_type 1 vs NORMAL_BONDS 1 BONDS_NO_HYDROGENS 15 COLOUR_BY_CHAIN_BONDS 3 COLOUR_BY_MOLECULE_BONDS 8 CA_BONDS 2 CA_BONDS_PLUS_LIGANDS 4
debug:: -------------- make_bonds_type_checked() done
INFO:: in run_post_read_model_hook() pFunc 0x0 is not callable
INFO:: in run_post_read_model_hook() pDict 0x135048180
INFO:: in run_post_read_model_hook() pModule 0x1350465e0
Molecule 1 read successfully
INFO:: comp-id: LIG is marked for non-autoloading - stopping now
INFO:: found bad LEU chiral atom: A 73   CG
INFO:: found bad LEU chiral atom: B 123   CG
INFO:: found bad VAL chiral atom: C 116   CB
INFO:: found bad THR chiral atom: D 43   CB
INFO:: found bad LEU chiral atom: D 123   CG
GTK-FIXME no fileselection add_sort_button_fileselection

(coot-bin:93677): Gtk-CRITICAL **: 12:12:08.078: gtk_widget_grab_default: assertion 'gtk_widget_get_can_default (widget)' failed
GTK-FIXME no fileselection C push the buttons

(coot-bin:93677): Gtk-WARNING **: 12:12:08.149: Error loading theme icon 'edit-delete' for stock: Icon 'edit-delete' not present in theme Adwaita

(coot-bin:93677): Gtk-WARNING **: 12:12:08.149: Error loading theme icon 'media-playback-start' for stock:

(coot-bin:93677): Gtk-WARNING **: 12:12:08.270: Error loading theme icon 'edit-clear' for stock:

(coot-bin:93677): Gtk-WARNING **: 12:12:08.354: Error loading theme icon 'edit-clear' for stock:
debug:: start coot::column_selector_using_cmtz() &&&&&&/Users/kelvinlau/Desktop/1/Demo-Avidin-2022_refine_21.mtz

 **SYMMETRY OPERATOR ERROR**

 Error in interpreting symop " -X,  Y+1/2,  -Z                                                            "

>>>>>> CCP4 library signal ccp4_parser:Failed to interpret symop string (Success)
     raised in symop_to_mat4 <<<<<<
Spacegroup_registry: ASU warning, LGhash=0xcad54e07
Spacegroup_registry: ASU fail
INFO:: not an mtz file: /Users/kelvinlau/Desktop/1/Demo-Avidin-2022_refine_21.mtz
[1]    93677 terminated  /usr/local/Cellar/coot/HEAD-6d32b4a/libexec/coot-bin

Screenshot 2022-04-04 at 12 12 38

biochem-fan commented 2 years ago

@pemsley I would recommend first compiling a simple GtkGLArea example https://github.com/ebassi/glarea-example with GTK4. If this doesn't work, GTK4 won't rescue Coot as well.