Affinity is a high-level machine learning API (Application Programming Interface) dedicated exclusively to molecular geometry. Affinity is written in TensorFlow; a small proportion of high-performance code is in low-level C++. Depending on the application it can be configured as multi-CPU, multi-CPU single GPU, or multi-GPU system. Affinity has its own web page at affinity.mit.edu