Skip to content

Instantly share code, notes, and snippets.

View save_density.py
#!/usr/bin/env python3
# -*- coding: UTF8 -*-
#############################################################################
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr #
# https://research.pasteur.fr/en/member/guillaume-bouvier/ #
# Copyright (c) 2021 Institut Pasteur #
# #
# #
# Redistribution and use in source and binary forms, with or without #
@bougui505
bougui505 / ruler.py
Last active Oct 9, 2020
Simple column ruler for shell
View ruler.py
#!/usr/bin/env python3
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-10-09 15:23:41 (UTC+0200)
import sys
import argparse
@bougui505
bougui505 / find_rigid_alignment_pytorch.py
Last active Nov 4, 2021
Rigid alignment between points (Kabsch algorithm). Pytorch implementation
View find_rigid_alignment_pytorch.py
#!/usr/bin/env python3
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-10-01 11:39:39 (UTC+0200)
import torch
import numpy as np
@bougui505
bougui505 / find_rigid_alignment.py
Last active Oct 6, 2020
Rigid alignment between points (Kabsch algorithm)
View find_rigid_alignment.py
#!/usr/bin/env python3
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-10-01 10:13:01 (UTC+0200)
import numpy as np
@bougui505
bougui505 / icp.py
Created Oct 1, 2020
Iterative Closest Point (ICP) implementation with least squares fit (lstsq) in Pytorch
View icp.py
#!/usr/bin/env python
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-10-01 09:51:45 (UTC+0200)
import sys
import torch
@bougui505
bougui505 / build_reflection_matrix.py
Created Oct 1, 2020
Build a reflection matrix in Pytorch
View build_reflection_matrix.py
#!/usr/bin/env python
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-10-01 09:45:36 (UTC+0200)
import torch
@bougui505
bougui505 / build_rotation_matrix_torch.py
Created Oct 1, 2020
Build a rotation matrix in Pytorch
View build_rotation_matrix_torch.py
#!/usr/bin/env python
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-10-01 09:43:30 (UTC+0200)
import torch
View mapalign.py
#!/usr/bin/env python3
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-09-29 15:48:44 (UTC+0200)
import pymol.cmd as cmd
import torch
import sys
View mol2parser.py
#!/usr/bin/env python3
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-03-06 13:17:44 (UTC+0100)
from pymol import cmd
from pymol import exporting
View bar.sh
#!/usr/bin/env zsh
# -*- coding: UTF8 -*-
# Author: Guillaume Bouvier -- guillaume.bouvier@pasteur.fr
# https://research.pasteur.fr/en/member/guillaume-bouvier/
# 2020-01-10 16:20:44 (UTC+0100)
# Simple bar chart plotting in a terminal by reading integer from stdin
# FIELD: Field number to read the value from