32#ifndef eman_pointarray_h_
33#define eman_pointarray_h_
38#if defined USE_NFFT || USE_NFFT2
68 bool read_from_pdb(
const char *file,
const vector<int> &lines=vector<int>());
111 void mask(
double rmax,
double rmin = 0.0);
139 void opt_from_proj(
const vector<EMData*> & proj,
float pixres);
174 void sim_set_pot_parms(
double pdist0,
double pdistc,
double pangc,
double pdihed0,
double pdihedc,
double pmapc,
EMData *pmap,
double pmindistc,
double pdistpenc);
184 vector<double>
fit_helix(
EMData *pmap,
int minlength,
float mindensity,vector<int> edge,
int twodir,
size_t minl);
187 vector<float>
do_pca(
int start,
int end);
190 vector<float>
do_filter(vector<float> pts,
float *ft,
int num);
193 vector<double>
construct_helix(
int start,
int end,
float phs,
float &score,
int &dir);
EMData stores an image's data and defines core image processing routines.
FloatPoint defines a float-coordinate point in a 1D/2D/3D space.
PointArray defines a double array of points with values in a 3D space.
EMData * projection_by_summation(int image_size, float apix, float res)
Transform * align_2d(PointArray *to, float max_dist)
Aligns one PointArray to another in 2 dimensions.
void save_pdb_with_helix(const char *file, vector< float > hlxid)
Save the point array to pdb file, including helices information.
void save_to_pdb(const char *file)
double * get_points_array()
Transform calc_transform(PointArray *p)
Calculate the transform to another identical pointarray.
void sim_add_point_double()
Add more points during the simulation.
EMData * distmx(int sortrows=0)
Calculates a (symmetrized) distance matrix for the current PointArray.
void set_from_density_map(EMData *map, int num, float thresh, float apix, Density2PointsArrayAlgorithm mode=PEAKS_DIV)
vector< double > fit_helix(EMData *pmap, int minlength, float mindensity, vector< int > edge, int twodir, size_t minl)
Fit helix from peptide chains.
double get_value_at(int i)
vector< float > get_points()
Returns all x,y,z triplets packed into a vector<float>
void sim_minstep_seq(double meanshift)
Takes a step to minimize the potential.
void replace_by_summation(EMData *image, int i, Vec3f vec, float amp, float apix, float res)
void sim_updategeom()
Updates the dist, ang, dihed parameters.
bool read_ca_from_pdb(const char *file)
Read only C-alpha atoms from a pdb file.
vector< int > match_points(PointArray *to, float max_miss=-1.0)
Will try to establish a 1-1 correspondence between points in two different PointArray objects (this a...
EMData * projection_by_nfft(int image_size, float apix, float res=0)
void sim_minstep(double maxshift)
Takes a step to minimize the potential.
EMData * pdb2mrc_by_summation(int map_size, float apix, float res, int addpdbbfactor)
vector< double > construct_helix(int start, int end, float phs, float &score, int &dir)
Construct an ideal helix between the start and end points given phase.
vector< float > do_pca(int start, int end)
Do principal component analysis to (a subset of) the point array, used in helix fitting in pathwalker...
void opt_from_proj(const vector< EMData * > &proj, float pixres)
Optimizes a pointarray based on a set of projection images (EMData objects) This is effectively a 3D ...
PointArray & operator=(PointArray &pa)
void merge_to(PointArray &pa, float thr)
Merge to another point array.
Vec3f get_vector_at(int i)
float calc_helicity(vector< double > pts)
Calculate the helicity of some points.
void right_transform(const Transform &transform)
Does Transform*v as opposed to v*Transform (as in the transform function)
EMData * pdb2mrc_by_nfft(int map_size, float apix, float res)
double sim_potentialdxyz(int i, double dx, double dy, double dz)
Compute a potential value for a perturbed point, including +-2 nearest neighbors which will also be i...
void set_from(vector< float >)
Region get_bounding_box()
void mask(double rmax, double rmin=0.0)
void delete_point(int id)
Delete one point in the array.
double dist0
Used for simplistic loop dynamics simulation Assumes all points are connected sequentially in a close...
double sim_potentiald(int ind)
Compute a single point potential value.
void sim_printstat()
prints some statistics to the screen
void set_vector_at(int i, Vec3f vec, double value)
void set_number_points(size_t nn)
void reverse_chain()
Reverse the pointarray chain.
Density2PointsArrayAlgorithm
double calc_total_length()
Calculate total length.
void sort_by_axis(int axis=1)
bool read_from_pdb(const char *file, const vector< int > &lines=vector< int >())
void set_points_array(double *p)
void transform(const Transform &transform)
void sim_set_pot_parms(double pdist0, double pdistc, double pangc, double pdihed0, double pdihedc, double pmapc, EMData *pmap, double pmindistc, double pdistpenc)
Sets the parameters for the energy function.
void remove_helix_from_map(EMData *m, vector< float > hlxid)
Remove the corresponding density of the helix point from a density map.
double sim_potential()
Computes overall potential for the configuration.
void sim_rescale()
rescale the entire set so the mean bond length matches dist0
vector< float > do_filter(vector< float > pts, float *ft, int num)
Filter the point array to smooth the line, used in helix fitting in pathwalker.
double sim_pointpotential(double dist, double ang, double dihed)
Computes a potential value for a single point from a set of angles/distances using current energy set...
Vec3f sim_descent(int i)
returns a vector pointing downhill for a single point
size_t get_number_points() const
vector< Vec3f > oldshifts
void mask_asymmetric_unit(const string &sym)
Region defines a 2D or 3D rectangular region specified by its origin coordinates and all edges' sizes...