Skip to content

Commit

Permalink
Bump version to 2.1.0-beta and add some more documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mittinatten committed May 9, 2021
1 parent fa020ae commit 3926286
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 12 deletions.
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,24 @@

FreeSASA uses semantic versioning. Changelog added for versions 2.x

## Pending
## 2.1.0-beta

### Added

- Fix bug in JSON output where relative SASA for amino acids without sidechan
were written as `NaN`, which is not valid JSON. These values are now
simply skipped.
- Support for mmCIF input with the CLI option `--cif`.
- The CLI was ported to C++ to allow using Gemmi for CIF import.
- Gemmi is imported as a git submodule, see README for details.
- A test runner was added to verify that CIF and PDB input files
give the same result.
- The C API does not support CIF for now (this would require conversion to C++).
- Add output option `--format=cif` that can be used when input is mmCIF.
See documentation for an example.

### Fixed

- Fix bug in JSON output where relative SASA for amino acids without sidechan
were written as `NaN`, which is not valid JSON. These values are now
simply skipped.
- Fix bug where elements with H or D as second element, such as CD, were classified
as hydrogens.

Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![DOI](https://zenodo.org/badge/18467/mittinatten/freesasa.svg)](https://zenodo.org/badge/latestdoi/18467/mittinatten/freesasa)

FreeSASA is a C library and command line tool for calculating Solvent
FreeSASA is a C library and C++ command line tool for calculating Solvent
Accessible Surface Area (SASA) of biomolecules. It is designed to be
simple to use with defaults, but allows customization of all
parameters of the calculation and provides a few different tools to
Expand Down Expand Up @@ -51,6 +51,9 @@ includes the autogenerated scripts from http://freesasa.github.io/ or
from the latest
[GitHub-release](https://github.com/mittinatten/freesasa/releases).

If you are upgrading from a pre 2.1.0 build you might need to call
`make clean` before building.

The above commands build and install the command line tool `freesasa`
(built in `src/`), the commands

Expand Down Expand Up @@ -112,8 +115,10 @@ explains how the commandline tool can be used.
## Compatibility and dependencies

The library has been tested successfully with several versions of GNU
C Compiler and Clang/LLVM. It can be built using only
standard C and GNU libraries. The standard build depends on
C/C++ Compiler and Clang/LLVM. It can be built using only
standard C and GNU libraries, in addition to
[Gemmi](https://github.com/project-gemmi/gemmi) (as a git submodule).
The standard build depends on
[json-c](https://github.com/json-c/json-c) and
[libxml2](http://xmlsoft.org/). These can be disabled by configuring
with `--disable-json` and `--disable-xml` respectively.
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.68])
AC_INIT([FreeSASA], [2.0.3])
AC_INIT([FreeSASA], [2.1.0-beta])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
Expand Down
27 changes: 23 additions & 4 deletions src/freesasa.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ typedef enum {

/* Default parameters */
#define FREESASA_DEF_ALGORITHM FREESASA_LEE_RICHARDS /**< Default algorithm @ingroup core. */
#define FREESASA_DEF_PROBE_RADIUS 1.4 /**< Default probe radius (in Ångström). @ingroup core. */
#define FREESASA_DEF_SR_N 100 /**< Default number of test points in S&R. @ingroup core. */
#define FREESASA_DEF_LR_N 20 /**< Default number of slices per atom in L&R. @ingroup core. */
#define FREESASA_DEF_PROBE_RADIUS 1.4 /**< Default probe radius (in Ångström) @ingroup core. */
#define FREESASA_DEF_SR_N 100 /**< Default number of test points in S&R @ingroup core. */
#define FREESASA_DEF_LR_N 20 /**< Default number of slices per atom in L&R @ingroup core. */

/**
@brief Default ::freesasa_classifier
Expand Down Expand Up @@ -290,6 +290,11 @@ typedef enum {
FREESASA_NODE_NONE /**< for specifying not a valid node. */
} freesasa_nodetype;

/**
Struct to store data about a mmCIF atom site.
@ingroup structure
*/
typedef struct {
const char *group_PDB;
const char auth_asym_id;
Expand Down Expand Up @@ -840,7 +845,7 @@ int freesasa_structure_add_atom(freesasa_structure *structure,
@param x x-coordinate of atom.
@param y y-coordinate of atom.
@param z z-coordinate of atom.
@param classifier A freesasa_classifier to determine radius of atom and to
@param classifier A ::freesasa_classifier to determine radius of atom and to
decide if to keep atom or not (see options).
@param options A bitfield to determine what to do with unknown atoms (see above).
Expand All @@ -858,7 +863,21 @@ int freesasa_structure_add_atom_wopt(freesasa_structure *structure,
double x, double y, double z,
const freesasa_classifier *classifier,
int options);
/**
Add atoms from a mmCIF file to a structure
@param structure The structure to add to.
@param atom An atom site from a mmCIF file
@param classifier A ::freesasa_classifier to determine radius of atom and to
decide if to keep atom or not (see options).
@param options Structure options as in freesasa_structure_add_atom_wopt()
@return ::FREESASA_SUCCESS on normal execution. ::FREESASA_FAIL if
if memory allocation fails or if halting at unknown
atom. ::FREESASA_WARN if skipping atom.
@ingroup structure
*/
int freesasa_structure_add_cif_atom(freesasa_structure *structure,
freesasa_cif_atom *atom,
const freesasa_classifier *classifier,
Expand Down

0 comments on commit 3926286

Please sign in to comment.