QuickLookProtein is a macOS Quick Look extension to preview protein/3D structure files (PDB, SDF, CIF).

Overview

QuickLookProtein

QuickLookProtein is a macOS Quick Look extension to preview protein/3D structure files (PDB, SDF, CIF).

It works in all places where macOS uses Quick Look, e.g. in Finder and Spotlight. In Finder, just select the protein structure file and press Space to open Quick Look.

The rendering of the 3D structure is performed using 3Dmol.js.

The extension is packaged into a main app, whose purpose is to set a few settings used for the display of the 3D models.

I hope this app is useful to you! It is my first Mac OS/Swift app, so I am happy for any feedback! Just open an issue. :-)

Demonstration of the Quick Look extension in Finder

Screenshot of the main app

Installation

Requirements: QuickLookProtein requires macOS Big Sur (version 11.0+).

Download: The current version can be downloaded under releases.

Installation:

  1. After downloading the release, unpack the ZIP file.
  2. Move the QuickLookProtein.app to the Applications folder.
  3. Open QuickLookProtein.app. The Quick Look extension should automatically be installed and activated once the main app has been started for the first time. You can check that the extension is activated in System Preferences -> Extensions -> Quick Look.

Screenshot of System Preferences -> Extensions -> Quick Look

Features

File types

The following file types are currently supported:

  • .PDB
  • .CIF
  • .SDF

Note, that Quick Look extensions depend on the Uniform Type Identifier (UTI) for the association with a file type, and not simply on the file extension. The UTI of a file may change, depending on the applications you have installed that are associated with the given file type. I tried to register the Quick Look extension with some of the commonly used UTIs for the above file types. But in case the extension is not working on your machine, please let me know the UTI of the file you are trying to preview by running the following command in Terminal:

mdls -name kMDItemContentType filename.ext

Settings

The main app allows the customization of the rendering of the 3D structure. Currently, the following settings can be changed (default values in bold):

  • Atom display style (cartoon, line, stick, sphere)
  • Rotation speed (no rotation, slow, medium, fast)
  • Background color (any color, or transparent)

Note, that the cartoon style only works for proteins.

In future releases and depending on user feedback, I might implement additional customizations.

Implementation details

The code is written using Swift 5 in Xcode 12.5.

The Quick Look extension displays a Webkit view that uses some simple HTML and the 3Dmol.js library to render the 3D structure.

Credits

3Dmol.js is developed by Nicholas Rego and David Koes. See also their publication: Rego & Koes, 3Dmol.js: molecular visualization with WebGL, Bioinformatics, 2015

Comments
  • Does not open cif files

    Does not open cif files

    Hi there, firstly I wanted to say this sounds like a great quicklook extension!

    I tried to open a .cif file on my computer but it seems the plugin does not register. I should mention that I had CrystalMaker installed and it would seem that quicklook is defaulting to that program, even though it doesn't have a specific quicklook extension (as far as I am aware).

    For the file in question:

    >>> mdls -name kMDItemContentType GaAs_mp-2534_computed.ci:
    
    kMDItemContentType = "com.crystalmaker.crystalmaker.cif"
    

    The file itself is from MaterialsProject: https://materialsproject.org/materials/mp-2534/

    If you have any suggestions I would love to give this app a try!

    opened by harripj 4
  • Can't get extension to work

    Can't get extension to work

    After downloading and installing the Quick Look Protein extension it doesn't appear when using the MacOS Quick Look feature.

    OS details:

    macOS Big Sur
    version: 11.5.2
    

    Checking the Uniform Type Identifier I get the following:

    mdls -name kMDItemContentType 1xhz.pdb
    kMDItemContentType = "dyn.ah62d4rv4ge81a3dc"
    
    opened by glass-w 4
  • Default viewing mode based on filetype

    Default viewing mode based on filetype

    Love this plugin! I've noticed that for CIF files, which are usually small molecules, they don't display correctly in "Ribbon" format. Likewise, PDB files, which are usually proteins, are tough to interpret on anything other than ribbon mode. Would it be possible to set a default for each file type… e.g. "stick" for CIF files and "ribbon" for PDB files?

    opened by jgassens 3
  • Big Sur 11.5+ required?

    Big Sur 11.5+ required?

    Hello. Thanks for creating nice Quick Look extension. I tried to run this on Big Sur 11.0, but it did not work properly. It closed immediately when I ran it. After the OS upgrade to Big Sur 11.5, it works fine. This may require Big Sur 11.5+.

    opened by mariota20 1
  • Suggested new features

    Suggested new features

    Hi,

    I'm not very familiar with how a project like this is put together, and how everything works, but a few features that would be useful or just nice for chemists such as myself might be:

    • The option to manually change atom colours using the settings app you already have.
    • Can more file types be used? For example a .res file (I can provide examples of these if needed).
    • For .cif files that contain disordered components, is it possible to filter so only PART0 and PART1 are shown? And could this selection be changed in the settings app?

    Thanks for this wonderful project.

    opened by ConradGoodwin 1
Releases(v1.4)
Owner
Jethro Hemmann
Postdoc in the area of microbiology and biochemistry at HKI Jena.
Jethro Hemmann
Create Live Graphics in SwiftUI (iOS, tvOS & macOS)

PixelUI import SwiftUI import PixelUI struct ContentView: View { var body: some View { GeometryReader { geo in

Anton Heestand 21 Dec 17, 2022
BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

Raúl Montón 16 Dec 21, 2022
🔎 All-in-one Quick Look plugin

Glance All-in-one Quick Look plugin Glance provides Quick Look previews for files that macOS doesn't support out of the box. Installation Steps About

Han Cen 257 Dec 27, 2022
Sample iOS AR app using AR Quick Look API

ARQLSanta This is a minimal AR iOS app that uses the AR Quick Look API, displayi

Yasuhito Nagatomo 9 Aug 23, 2022
Currency Converter - Free and Quick Converter calculates money quick and easy way to see live foreign exchange rates.

Currency Converter - Free and Quick Converter calculates money quick and easy way to see live foreign exchange rates. This app is available in the App

Tirupati Balan 212 Dec 30, 2022
Quick Symlink - a Finder extension which provides a contextual menu item for the symbolic links creation on macOS

Quick Symlink The Quick Symlink is a Finder extension which provides a contextual menu item for the symbolic links (and other links) creation on macOS

Alexander Kropotin 29 Dec 20, 2022
Classes-and-structures-in-swift - This source files show what is the difference between class and structure

This source files show what is the difference between class and structure You ca

null 0 Jan 4, 2022
An NSURL extension for showing preview info of webpages

URLPreview An NSURL extension for showing preview info of webpages. You may want to use it if you want to mimick Facebook app's behavior when you post

Huong Do 198 Dec 5, 2022
Zip - A Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of minizip.

Zip A Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of minizip. Usage Import Zip at the top of the Swift file

Roy Marmelstein 2.3k Jan 3, 2023
Window preview app for MacOS (on the dock) using AltTab.

DockAltTab The #1 Window manager/Task switcher & Companion for AltTab v1.1 download link https://github.com/steventheworker/DockAltTab/releases/downlo

Steven G. 40 Jan 2, 2023
This is my first SwiftUI project, as I decided not to release it I made the codebase available here for anyone to take a look at.

Sunshine This is my first SwiftUI project, as I decided not to release it to the App Store. I made the codebase available here for anyone to take a lo

Maxime Heckel 20 Dec 14, 2022
Lickable-Button We made the buttons on the screen look so good you'll want to lick them

Lickable-Button We made the buttons on the screen look so good you'll want to lick them. - Steve Jobs A little SwiftUI button project at WWDC 2021 Lic

Nate Thompson 14 Dec 29, 2021
Weather forecast app that allows the user to either look for weather at their current location based on the GPS data or search for another city manually.

⛅️ Cloudy Weather forecast app that allows the user to either look for weather at their current location based on the GPS data or search for another c

Burhan 0 Nov 7, 2021
SwiftWebKit - This app look like a browser, but you can navigate between 2 sites

import UIKit import WebKit My first app for WebKit. This app look like a browser

Ahmet Onur Şahin 3 Apr 18, 2022
PJAlertView - This library is to make your own custom alert views to match your apps look and feel

PJAlertView - This library is to make your own custom alert views to match your apps look and feel

prajeet 6 Nov 10, 2017
A framework for presenting bars and view controllers as popup, much like the look and feel of Apple Music App.

PBPopupController PBPopupController is a framework for presenting bars and view controllers as popup, much like the look and feel of Apple Music App.

Patrick 58 Dec 3, 2022
Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files.

Installation • Configuration • Usage • Build Script • Donation • Migration Guides • Issues • Contributing • License BartyCrouch BartyCrouch incrementa

Flinesoft 1.3k Jan 1, 2023
A Swift sample code to reads ISO 10303-21 exchange structures (STEP P21 files for AP242) split into multiple files using external references approach.

multipleP21ReadsSample A Swift sample code to reads ISO 10303-21 exchange structures (STEP P21 files for AP242) split into multiple files using extern

Tsutomu Yoshida 1 Nov 23, 2021
BeatboxiOS - A sample implementation for merging multiple video files and/or image files using AVFoundation

MergeVideos This is a sample implementation for merging multiple video files and

null 3 Oct 24, 2022