New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: Homebrew formula for gtk3 (now GTK4) installation on macOS (or Linux) #33
Comments
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. |
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 Here is the installation step using my Homebrew formulae.
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. |
Ah, I accidentally tried to build from the 'refinement' branch, not 'gtk3'. Now I've fixed the After the installation, boot Coot using this command Thanks to the Coot community, libccp4 was successfully built on M1 Mac ( brewsci/homebrew-bio#1450 ). I updated the Formula of libccp4. However, installation of Coot on M1 Mac has not been tested yet because [email protected] cannot be installed properly on it... |
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.
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 |
@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 [email protected] and [email protected] 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 ./[email protected] --verbose
brew install ./[email protected] --verbose Then an error occurred:
/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 [email protected]
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, 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:
I was able to start COOT from |
Indeed! I was wondering how @YoshitakaMo made that work because I don't think that I have pushed the fix yet. |
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. |
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. |
I upgraded COOT to 050e7dd (not knowing if this is the right way)
and it worked so nicely! |
Hmm.. Please use the argument |
What is this option for? |
With |
So is it an option of |
It's an argument to coot - sorry that that was not clear. |
OK thanks. The appearance has changed a bit, but the resizing problem remains the same. |
Yep, I can confirm that the resizing problem remains on macOS Coot 1.0 (commit e55c6b9) Screen.Recording.2022-04-01.at.18.19.47.squish.mp4I hope this video helps you identify where the issue might be in the code? |
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. |
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. |
The problem is in In "Plain" render mode it seems that |
More pixels, more time to draw a frame. Here's another video (so you can check out the FPS meter): |
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). |
Hi, I'm aware there may be a lot of people waiting for a one-liner installation using Homebrew.
I guess the |
Curious that blake-riley didn't have the same problem: |
@huwjenkins, Thanks! Patches of https://sources.debian.org/patches/fftw/2.1.5-6/ (especially "05_ac_define_syntax.diff") and |
Sorry for not mentioning it. I threw in
to clipper4coot.rb (ahead of the |
FWIW I was also able to drop the |
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
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. After the ignore, everything seemed to be successful but under I tried to
|
@Species10C: there is a race condition in |
@KevinPros please don't paste screenshots - paste the actual text in code tags. Anyway I can reproduce with 14a9d28 and 1.1.07: looks like known issue g-truc/glm#1269 |
It seems to me to be a glm issue. I edited the header "by hand" by removing the [[nodiscard]] and things progressed. |
It's annoying that homebrew makes it so hard to use an older version of glm to build Coot though:
I have glm 0.9.9.8 installed which used to work and now I can't install Coot with homebrew because homebrew updated glm and won't let me revert to the old version 😠 |
The only supported way to do this seems to be making a custom 'Tap' copying the old glm 0.9.9.8 formula there and changing it to
|
Hi @YoshitakaMo @pemsley, Thanks for your instructions to install GTK4 coot on M2-chip Mac, do you have tutorial about how to operate? It's similar as Wincoot and coot1 generally, but I could not find how to do real space refinement zone by selecting two atoms as I did in wincoot, and selected area will skip to somewhere else when I try to select two atoms. Thanks for your answer. |
@huangpeng427 You are right. GTK4 Coot (i.e. 1.1 or later) is "Select First/Centre First" - it is the residue at the centre of the screen that is the selection when you press a button. You don't need to pick on an atom in a residue (or residues) after selecting the tool. In the atypical case of wanting to refine a particular range, then you define the "Range/Pair" first - then click on "Refine" and then select "RSR Range Refine." I need to make a video. |
@pemsley Got it. Thanks very much. |
@pemsley Hi, I'm writting to ask another question regarding operation. How to meaure distance between 2 atoms in GTK4? It doesn't work when I click to selected two atoms to be measured after choosing measure--distance, and doesn't work neither when I center atom to be measured by moving the cursor. Thanks. |
This is how it is supposed to work (with left click): Measure -> Distances & Angles -> Distance -> {Click atom 1} {Click atom 2} I can confirm that it works that way for me. |
Hi @pemsley, thanks for your reply, I believe this is same way as Wincoot, but in my GTK4, I can only see two atoms labels appear when I clicked them, but not distance, strange? |
I've updated $ /opt/homebrew/Cellar/coot/1.1.08/bin/coot
/opt/homebrew/Cellar/coot/1.1.08/bin/coot: error: '/opt/homebrew/Cellar/coot/1.1.08/bin/.libs/Coot' does not exist
This script is just a wrapper for Coot.
See the libtool documentation for more information. |
@YoshitakaMo Yay, nicely done.
|
That was my intention.
Yes. Sounds like a bug. I have not seen that behavior before. Hmm. Can you test that it behaves the same way for you using the Tutorial Model? |
@pemsley, sure, but where to find Tutorial model? |
@huangpeng427 Calculate -> Load Tutorial Model and Data |
@YoshitakaMo I think I see what is going wrong. The file system doesn't understand that
You will have to determine what |
I think modifying the lines in # Try to get the absolute directory name.
absdir=`cd "$thisdir" && pwd`
test -n "$absdir" && thisdir="$absdir"
program='Coot'
- progdir="$thisdir/.libs"
+ # progdir="$thisdir/.libs"
+ progdir="$thisdir/../libexec" But it's not a good solution, is it? |
@YoshitakaMo What we need is a command line argument that tells the build system whether or not to make |
Now I've implemented my workaround in |
@YoshitakaMo Great. Thank you. |
How to Install This initiate but end up with error ==> /opt/homebrew/opt/[email protected]/bin/python3.12 -m pip --python=/opt/homebrew/Cellar/coot/1.1.08/libexec/bin/python install --verbose --no-deps --no-binary=:all: --ignore-installed --no-compile /private/tmp/coot--idna-20240427-63806-m35onw/idna-3.4 × pip subprocess to install build dependencies did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × pip subprocess to install build dependencies did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. ==> Formula Error: coot 1.1.08 did not build |
It seems that your environment cannot access PyPi through port 443. This is not an issue of Coot itself. |
How do I rectify this |
That is a question for your network administrator. |
@pemsley Sorry for late response! I load tutorial model and map, and measure distance for two atoms from the model, but same as my case that there is no any distance showing from the measurement. |
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:
(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 #33 (comment))
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.
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.
The text was updated successfully, but these errors were encountered: