IMP  2.2.1
The Integrative Modeling Platform
core/simple.cpp

Simple example of using the IMP C++ library.

This should be equivalent to the first part of the Python example simple.py.

/** \example core/simple.cpp
Simple example of using the IMP C++ library.
This should be equivalent to the first part of the Python example simple.py.
*/
#include <fstream>
#include <IMP/kernel.h>
#include <IMP/algebra.h>
#include <IMP/core.h>
int main() {
// Create two "untyped" kernel::Particles
// "Decorate" the kernel::Particles with x,y,z attributes (point-like
// particles)
// Use some XYZ-specific functionality (set coordinates)
d1.set_coordinates(IMP::algebra::Vector3D(10.0, 10.0, 10.0));
d2.set_coordinates(IMP::algebra::Vector3D(-10.0, -10.0, -10.0));
std::cout << d1 << " " << d2 << std::endl;
return 0;
}