Skip to content

Commit

Permalink
Merge for 1.6.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Dec 14, 2023
2 parents f4030cd + 82c052f commit c4a32b0
Show file tree
Hide file tree
Showing 38 changed files with 296 additions and 77 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: 2.7
install: ''
flags: '--coverage'
tests: RMF
build: Debug
- os: ubuntu-latest
python-version: 3.9
install: ''
Expand Down Expand Up @@ -57,7 +51,7 @@ jobs:
if: matrix.os == 'macos-latest'
run: |
brew install swig boost log4cxx ${{ matrix.install }}
pip install coverage
pip install coverage numpy
- name: Build and test
run: |
mkdir build
Expand Down
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 2.8.12...3.6.0)
project(RMF)

# needs to be in main CMakeLists.txt
Expand Down Expand Up @@ -139,8 +139,9 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)

# Version information
set (RMF_VERSION_MAJOR 1)
set (RMF_VERSION_MINOR 5)
set (RMF_VERSION_MICRO 1)
set (RMF_VERSION_MINOR 6)
set (RMF_VERSION_MICRO 0)
math (EXPR RMF_VERSION "${RMF_VERSION_MAJOR} * 100000 + ${RMF_VERSION_MINOR} * 100 + ${RMF_VERSION_MICRO}")

set(RMF_SOVERSION "${RMF_VERSION_MAJOR}.${RMF_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
set(RMF_HAS_DEBUG_VECTOR 0 CACHE BOOL "Whether to use a bounds checked vector")
Expand Down
12 changes: 10 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
Change Log {#changelog}
==========

# 1.6.0 - 2023-12-14 # {#changelog_1_6_0}
- RPM packages for IMP for RedHat Linux (and clones such as Alma or Rocky)
and for Fedora are now provided by the
[COPR project](https://copr.fedorainfracloud.org/coprs/salilab/salilab/).
- RMF::decorator::Chain can now store a per-chain sequence offset and UniProt
accession. The offset, which defaults to zero, maps from the sequence index
(which always starts at 1) to the residue index (which may not).

# 1.5.1 - 2023-06-08 # {#changelog_1_5_1}
- Any String or Strings attributes containing fileystem paths are now
- Any String or Strings attributes containing filesystem paths are now
rewritten when the RMF static frame is cloned (e.g. during `rmf_slice`
or `rmf_cat`) so that they are relative to the new file, not the old one.
This relies on the convention that path attributes have names ending in
Expand Down Expand Up @@ -57,7 +65,7 @@ Change Log {#changelog}
be accurately stored in the file.)

# 1.1 - 2014-03-07 # {#changelog_1_1}
- To be more consisent, RMF::decorator::Domain and
- To be more consistent, RMF::decorator::Domain and
RMF::decorator::Fragment had their access methods modified to
include `residue` in the name.
- A Pymol plugin was added
Expand Down
2 changes: 1 addition & 1 deletion bin/rmf3_dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

#include <memory>
#include <stddef.h>
#include <cstddef>
#include <exception>
#include <iostream>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion bin/rmf_cat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int main(int argc, char** argv) {
"input-files,i",
boost::program_options::value<std::vector<std::string> >(&inputs),
"input rmf file");
positional_names.push_back("input_1.rmf input_2.rmf ... output.rmf");
positional_names.emplace_back("input_1.rmf input_2.rmf ... output.rmf");
positional_options_description.add("input-files", -1);
process_options(argc, argv);
if (inputs.size() < 3) {
Expand Down
2 changes: 1 addition & 1 deletion bin/rmf_interpolate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void interpolate_frames(int num, double noise, double angle_noise,
// boost::random_device seed_gen;
boost::mt19937 rng;
// rng.seed(seed_gen());
rng.seed(static_cast<boost::uint64_t>(std::time(NULL)));
rng.seed(static_cast<boost::uint64_t>(std::time(nullptr)));
boost::normal_distribution<> nd(0.0, noise);
boost::variate_generator<boost::mt19937&, boost::normal_distribution<> >
normal_random(rng, nd);
Expand Down
4 changes: 2 additions & 2 deletions bin/rmf_pdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ RMF_ENABLE_WARNINGS namespace {
out << str;
}
RMF::NodeConstHandles ch = nh.get_children();
for (unsigned int i = 0; i < ch.size(); ++i) {
current_index = write_atoms(out, current_index, ch[i], ipf, af, cf, rf,
for (const auto &c : ch) {
current_index = write_atoms(out, current_index, c, ipf, af, cf, rf,
chain, residue_index, residue_type);
}
return current_index;
Expand Down
4 changes: 2 additions & 2 deletions bin/rmf_transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ void transform(RMF::NodeHandle nh,
RMF_TRANSFORM_LIST(cf, Cylinder, coordinates_list);
RMF_TRANSFORM_LIST(sf, Segment, coordinates_list);
RMF::NodeHandles children = nh.get_children();
for (unsigned int i = 0; i < children.size(); ++i) {
transform(children[i], ipf, rpf, rff, bf, cf, sf, scale, translation);
for (const auto &child: children) {
transform(child, ipf, rpf, rff, bf, cf, sf, scale, translation);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions bin/rmf_xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ void show_hierarchy(RMF::NodeConstHandle nh, const RMF::Categories& cs,
<< "type=\"" << nh.get_type() << "\">\n";
if (seen.find(nh) == seen.end()) {
if (variables_map.count("verbose")) {
for (unsigned int i = 0; i < cs.size(); ++i) {
show_data_xml(nh, cs[i], out);
for (const auto &c : cs) {
show_data_xml(nh, c, out);
}
}
RMF::NodeConstHandles children = nh.get_children();
for (unsigned int i = 0; i < children.size(); ++i) {
for (const auto &child : children) {
out << "<child>\n";
show_hierarchy(children[i], cs, seen, out);
show_hierarchy(child, cs, seen, out);
out << "</child>\n";
}
seen.insert(nh);
Expand Down
1 change: 1 addition & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#define RMF_VERSION_MAJOR @RMF_VERSION_MAJOR@
#define RMF_VERSION_MINOR @RMF_VERSION_MINOR@
#define RMF_VERSION_MICRO @RMF_VERSION_MICRO@
#define RMF_VERSION @RMF_VERSION@

#define RMF_HAS_LOG4CXX @RMF_HAS_LOG4CXX@
#define RMF_HAS_NUMPY @RMF_HAS_NUMPY@
Expand Down
2 changes: 1 addition & 1 deletion data/uncrustify.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,7 @@ cmt_insert_func_header = "" # string
# Will substitute $(class) with the class name.
cmt_insert_class_header = "" # string

# The filename that contains text to insert before a Obj-C message specification if the method isn't preceeded with a C/C++ comment.
# The filename that contains text to insert before a Obj-C message specification if the method isn't preceded with a C/C++ comment.
# Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff.
cmt_insert_oc_msg_header = "" # string

Expand Down
2 changes: 2 additions & 0 deletions doc/DecoratorsAndAttributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ The category name is `sequence` and it includes information about the types and
| `residue index` | int | The index of a residue |
| `chain id` | string | The chain ID |
| `sequence` | string | Primary sequence of a chain |
| `sequence offset`| int | Offset from sequence index to residue index |
| `chain type` | string | Type of chain sequence (e.g. Protein, DNA, RNA) |
| `uniprot accession`| string | UniProt accession code for the sequence |
| `first residue index` | int | The index of the first residue (in a domain) |
| `last residue index` | int | The index of the last residue (in a domain) |
| `residue indexes` | ints | The list of indexes in a fragment |
Expand Down
8 changes: 4 additions & 4 deletions doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@ HTML_STYLESHEET =
# defined cascading style sheet that is included after the standard style sheets
# created by doxygen. Using this option one can overrule certain style aspects.
# This is preferred over using HTML_STYLESHEET since it does not replace the
# standard style sheet and is therefor more robust against future updates.
# standard style sheet and is therefore more robust against future updates.
# Doxygen will copy the style sheet file to the output directory. For an example
# see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
Expand Down Expand Up @@ -1962,9 +1962,9 @@ PREDEFINED = RMF_DOXYGEN \
EXPAND_AS_DEFINED =

# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
# remove all refrences to function-like macros that are alone on a line, have an
# all uppercase name, and do not end with a semicolon. Such function macros are
# typically used for boiler-plate code, and will confuse the parser if not
# remove all references to function-like macros that are alone on a line, have
# an all uppercase name, and do not end with a semicolon. Such function macros
# are typically used for boiler-plate code, and will confuse the parser if not
# removed.
# The default value is: YES.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
Expand Down
4 changes: 4 additions & 0 deletions doc/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ or on a Mac with [Homebrew](https://brew.sh/), install with

brew tap salilab/salilab; brew install rmf

or on a Fedora or RedHat Enterprise Linux system, install with

dnf copr enable salilab/salilab; dnf install RMF

IMP: Download an IMP binary (which includes RMF) from the
[IMP download page](https://integrativemodeling.org/download.html).

Expand Down
2 changes: 1 addition & 1 deletion doc/Library.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ its hierarchy and objects in the program accessing. The methods
RMF::FileConstHandle::get_node_handle_from_association(),
RMF::NodeConstHandle::set_association() and
RMF::NodeConstHandle::get_assocation() can be used to take advantage of
this. The idea is that one can store pointers to the programatic
this. The idea is that one can store pointers to the programmatic
data structures corresponding to the nodes and so avoid maintaining
ones own lookup table. Any function used in an association must support
a `get_uint()` function. An implementation is provided for pointers.
Expand Down
2 changes: 1 addition & 1 deletion examples/cloning.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## \example cloning.py
# RMF includes functions to help cloning files an extracting parts. They are
# also exposed throught the [rmf_slice](\ref rmf_slice) application.
# also exposed through the [rmf_slice](\ref rmf_slice) application.

from __future__ import print_function
import RMF
Expand Down
2 changes: 1 addition & 1 deletion plugins/vmd/Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ std::array<int, 2> Data::fill_bodies(RMF::NodeConstHandle cur, int body,
std::array<char, 8> segment,
double resolution) {
std::array<int, 2> ret = {{0}};
// must be firest due to ret
// must be first due to ret
if (altf_.get_is(cur))
boost::tie(cur, altid, ret) = handle_alternative(
cur, body, chain, resid, resname, altid, segment, resolution);
Expand Down
6 changes: 3 additions & 3 deletions plugins/vmd/include/molfile_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ typedef struct {
int memory; /**< amount of memory used in Mbyte. */
int runtype; /**< flag indicating the calculation method. */
int scftype; /**< SCF type: RHF, UHF, ROHF, GVB or MCSCF wfn. */
int status; /**< indicates wether SCF and geometry optimization
int status; /**< indicates whether SCF and geometry optimization
* have converged properly. */
int num_electrons; /**< number of electrons. XXX: can be fractional in some
DFT codes */
Expand All @@ -324,7 +324,7 @@ typedef struct {
int *num_shells_per_atom; /**< number of shells per atom */
int *num_prim_per_shell; /**< number of shell primitives shell */

float *basis; /**< contraction coeffients and exponents for
float *basis; /**< contraction coefficients and exponents for
* the basis functions in the form
* {exp(1), c-coeff(1), exp(2), c-coeff(2), ...};
* array size = 2*num_basis_funcs
Expand Down Expand Up @@ -633,7 +633,7 @@ typedef struct {
#endif

/**
* XXX this function will be augmented and possibly superceded by a
* XXX this function will be augmented and possibly superseded by a
* new QM-capable version named read_timestep(), when finished.
*
* Read the next timestep from the file. Return MOLFILE_SUCCESS, or
Expand Down
4 changes: 2 additions & 2 deletions src/backend/BackwardsIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ std::array<std::string, 4> make_array(std::string a, std::string b,
return ret;
}
}
typedef std::pair<std::string, std::array<std::string, 3> > P3;
using P3 = std::pair<std::string, std::array<std::string, 3> >;
const P3 vector_3_names[] = {
P3("coordinates", make_array("cartesian x", "cartesian y", "cartesian z")),
P3("translation",
Expand All @@ -44,7 +44,7 @@ const int vector_3_names_size =

V3N vector_3_names_map(vector_3_names, vector_3_names + vector_3_names_size);

typedef std::pair<std::string, std::array<std::string, 4> > P4;
using P4 = std::pair<std::string, std::array<std::string, 4> >;

const P4 vector_4_names[] = {
P4("orientation", make_array("orientation r", "orientation i",
Expand Down
2 changes: 1 addition & 1 deletion src/backend/avro/traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ struct BackwardsTypeDatas {
};

struct BackwardsFrame {
typedef rmf_raw_avro2::_Frame_json_Union__0__ info_t;
using info_t = rmf_raw_avro2::_Frame_json_Union__0__;
info_t info;
std::vector<rmf_raw_avro2::Node> nodes;
std::vector<rmf_raw_avro2::KeyInfo> keys;
Expand Down
18 changes: 9 additions & 9 deletions src/backend/deprecated_avro/create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ namespace RMF {
namespace avro_backend {
namespace {

typedef backends::BackwardsIO<avro_backend::AvroSharedData<
avro_backend::SingleAvroFile> > SingleAvroShareData;
typedef backends::BackwardsIO<avro_backend::AvroSharedData<
avro_backend::MultipleAvroFileWriter> > AvroWriterShareData;
typedef backends::BackwardsIO<avro_backend::AvroSharedData<
avro_backend::MultipleAvroFileReader> > AvroReaderShareData;
using SingleAvroShareData = backends::BackwardsIO<avro_backend::AvroSharedData<
avro_backend::SingleAvroFile> >;
using AvroWriterShareData = backends::BackwardsIO<avro_backend::AvroSharedData<
avro_backend::MultipleAvroFileWriter> >;
using AvroReaderShareData = backends::BackwardsIO<avro_backend::AvroSharedData<
avro_backend::MultipleAvroFileReader> >;

struct SingleTextAvroFactory : public RMF::backends::IOFactory {
virtual std::string get_file_extension() const override {
Expand All @@ -55,7 +55,7 @@ struct SingleTextAvroFactory : public RMF::backends::IOFactory {
const std::string& name) const override {
return std::make_shared<SingleAvroShareData>(name, true, false);
}
virtual ~SingleTextAvroFactory() {}
virtual ~SingleTextAvroFactory() = default;
};

struct SingleAvroFactory : public SingleTextAvroFactory {
Expand All @@ -76,7 +76,7 @@ struct SingleAvroFactory : public SingleTextAvroFactory {
return std::shared_ptr<RMF::backends::IO>();
}
}
virtual ~SingleAvroFactory() {}
virtual ~SingleAvroFactory() = default;
};

struct MultipleAvroFactory : public RMF::backends::IOFactory {
Expand All @@ -91,7 +91,7 @@ struct MultipleAvroFactory : public RMF::backends::IOFactory {
const std::string& name) const override {
return std::make_shared<AvroWriterShareData>(name, true, false);
}
virtual ~MultipleAvroFactory() {}
virtual ~MultipleAvroFactory() = default;
};
} // namespace
std::vector<std::shared_ptr<backends::IOFactory> > get_factories() {
Expand Down
7 changes: 3 additions & 4 deletions src/backend/deprecated_hdf5/HDF5SharedData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,9 @@ unsigned int HDF5SharedData::add_category_impl(std::string name) {

Categories HDF5SharedData::get_categories() const {
Categories ret;
for (CategoryDataMap::const_iterator it = category_data_map_.begin();
it != category_data_map_.end(); ++it) {
if (it->second.name == "link") continue;
ret.push_back(it->first);
for (const auto &it : category_data_map_) {
if (it.second.name == "link") continue;
ret.push_back(it.first);
}
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion src/backend/deprecated_hdf5/HDF5SharedData.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <array>
#include <boost/ptr_container/ptr_vector.hpp>
#include <hdf5.h>
#include <stddef.h>
#include <cstddef>
#include <algorithm>
#include <functional>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions src/backend/deprecated_hdf5/create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace RMF {
namespace hdf5_backend {
namespace {

typedef backends::BackwardsIO<HDF5SharedData> MIO;
using MIO = backends::BackwardsIO<HDF5SharedData>;

struct HDF5Factory : public RMF::backends::IOFactory {
virtual std::string get_file_extension() const override {
Expand All @@ -43,7 +43,7 @@ struct HDF5Factory : public RMF::backends::IOFactory {
const std::string& name) const override {
return std::make_shared<MIO>(name, true, false);
}
virtual ~HDF5Factory() {}
virtual ~HDF5Factory() = default;
};

} // namespace
Expand Down
Loading

0 comments on commit c4a32b0

Please sign in to comment.