meshi.symmetryComplex.proteinsGJ
Class CoordinatesAssigner

java.lang.Object
  extended by meshi.symmetryComplex.proteinsGJ.CoordinatesAssigner
All Implemented Interfaces:
KeyWords

public class CoordinatesAssigner
extends java.lang.Object
implements KeyWords

Created by IntelliJ IDEA. User: tetyanam Date: 15/01/2009 Time: 11:24:28 To change this template use File | Settings | File Templates.


Field Summary
(package private) static double angleXfrom
           
(package private) static double angleXto
           
(package private) static double angleZfrom
           
(package private) static double angleZto
           
static double CA_CA_DISTANCE
           
static double CA_CA_DISTANCE2
           
private  double clashDistance
           
private static int currentResidueIndex
           
static double DELTA_ANGLE
           
static double DISTANCE_BetweenLoops
           
private  SymmetricComplex gj
           
private  double innerBarrelHeight
           
private  double innerBarrelInnerR
           
private  double innerBarrelOuterR
           
static boolean isDistanceBetweenLoops
           
(package private) static boolean isSteps
           
(package private) static boolean isStrictClashes
           
private  int[] LOOP1_IN_BARREL_RESIDUES
           
private  int[] LOOP2_IN_BARREL_RESIDUES
           
private  Loop[] loops
           
private  int maxNumberOfClashes
           
 int nLoops
           
private  int nTries
           
private  double outerBarrelHeight
           
private  double outerBarrelInnerR
           
private  double outerBarrelOuterR
           
private  ResidueList residueList
           
private  int size
           
private  int sizeMinusOne
           
private  int sizeMinusTwo
           
(package private) static boolean toConstrict
           
private  Topology topology
           
private  java.util.List<Transformation> transformations
           
 
Fields inherited from interface meshi.util.KeyWords
AA_SEQUENCE, ACCESIBILITY_SEQUENCE, ALINMENT_FILE_PATH, ALL_CA, ALPHA_ANGLE_ENERGY, ALPHA_TORSION_ENERGY, ANGLE_ENERGY, ANGLE_X, ANGLE_Z, ATOMIC_PAIRWISE_PMF_SUMMA_ENERGY, BEAUTIFY_PROBLEMATIC_RANGE, BFGS, BOND_ENERGY, BUFFER_SIZE, CA_CLASH_DISTANCE, CA_LONG_DISTANCE, CA_MODEL, CA_SHORT_DISTANCE, CA_TETHER_ENERGY, CALPHA_HYDROGEN_BONDS, CALPHA_HYDROGEN_BONDS_PLANE, CASP_GROUP, CG, CHECK_INTERLOOP_DISTANCE, CLASH_DISTANCE, COMPOSITE_PROPENSITY_ENERGY, CONSENSUS_ENERGY, CONSTRICT, COOPERATIVE_ATOMIC_PAIRWISE_PMF_SUMMA_ENERGY, COOPERATIVE_ATOMIC_PAIRWISE_PMF_SUMMA_FILENAME, COOPERATIVE_PERATOM_SUMMA_ENERGY, COOPERATIVE_PERATOM_SUMMA_FILENAME, COOPERATIVE_PROPENSITY_ENERGY, COOPERATIVE_PROPENSITY_FILENAME, COOPERATIVE_RAMACHANDRAN_ENERGY, COOPERATIVE_RAMACHANDRAN_FILENAME, COOPERATIVE_Z_PROPENSITY_ENERGY, COOPERATIVE_Z_PROPENSITY_FILENAME, COOPERATIVE_Z_RAMACHANDRAN_ENERGY, COOPERATIVE_Z_RAMACHANDRAN_FILENAME, COOPERATIVE_Z_SUMMA_ENERGY, COOPERATIVE_Z_SUMMA_FILENAME, CORPUS_FILE_NAME, CSAonly_FILES_LOCATION_PATH, CUTOFF, CYLINDER_ENERGY, DICTIONARY_KEY, DIELECTRIC_CONSTANT, DISTANCE_CONSTRAINT_PCA, DISTANCE_CONSTRAINTS_ENERGY, DISTANCE_CONSTRAINTS_MASK, DISTANCE_FROM_CENTROID_ENERGY, DRESSER_FRAGMENTS, EDM_ENERGY, EDM_ENERGY_FILE_NAME, ELECTROSTATICS, END, EXCLUDED_VOL, FINAL_TEMPERATURE, FIX_C_TERMINAL, FIX_N_TERMINAL, FLAT_RAMACH_ENERGY, FREE_FINAL_MINIMIZATION, GRID_EDGE, HYDROGEN_BONDS, HYDROGEN_BONDS_ANGLES, HYDROGEN_BONDS_PAIRS, HYDROGEN_BONDS_PLANE, INFLATE_ENERGY, INITIAL_TEMPERATURE, INPUT_FILE, INTER_SEGMENT_FACTOR, INTER_SEGMENT_TOLERANCE, INTRA_SEGMENT_FACTOR, INTRA_SEGMENT_TOLERANCE, ITERATIONS_ALLATOM, ITERATIONS_BACKBONE, ITERATIONS_CA, KEY_KEY, KOEHL_FILE, LBFGS, LENNARD_JONES, LENNARD_JONES_CA, LINEAR_RG, LOOP1, LOOP2, LOOSEN_EDGE_LENGTH, MAX_ANGLE, MAX_CLASHES, MAX_DISTANCE, MAX_RUN_TIME, MAX_STEPS, MAX_WIDTH_OF_HAIRPIN, MCM, MCM_PERTURBATION, MESHILOG_KEY, METHOD, MIN_WIDTH_OF_HAIRPIN, MINIMIZATION_LOOP, MINIMIZE, MODE, MODEL, MODEL_DSSP, MODEL_NUMBER, N_ATOMS, N_TRIES, NON_FROZEN_BOND_DEPTH, NON_FROZEN_RADIUS, NONE, NUMBER, NUMBER_OF_CA_ITERATIONS, NUMBER_OF_CHAINS, NUMBER_OF_MODELS, NUMBER_OF_RUNS, OFF, ON, OPTIMIZER, OUT_OFPLANE_ENERGY, OUTPUT_FILE_NAME, OUTPUT_FILE_PATH, PARAMETERS_DIRECTORY, PDB_FILE, PLANE_ENERGY, PROPENSITY_TORSION_ENERGY, R_MAX, RAMACHANDRAN_SIDECHAIN_ENERGY, REFERENCE, RELAX, REPORT_EVERY, RESTART_EVERY, RMS_TARGET, ROTAMER_LIBRARY, SATURATION, SECONDARY_STRUCTURE, SEED, SEQUENCE, SHOTGUN_MODEL, SMOOTH_ROTAMER_LIBRARY_ENERGY, SOLVATE_ENERGY, SS_NAME, SS_SEQUENCE, STEEPEST_DECENT, STEPS, STRICT_CLASHES, STRUCTURE_NAMES, SUPERIMPOSE, SYMMETRY_ENERGY, TARGET_FILE_PATH, TARGET_NAME, TARGET_SEQUENCE, TEMPLATE_DISTANCE_CONSTRAINTS, TEMPLATE_DSSP, TEMPLATE_ENERGY, TEMPLATE_FILE_PATH, TEMPLATE_NAME, TEMPLATE_STRUCTURE, TEMPLATE_TARGET_ALIGNMENT, TETHER_ENERGY, TOLERANCE, TOPOLOGY_MAP, TWO_TORSIONS_ENERGY, UN_WARP_ENERGY, UNSATISFIED_CUTTOF, UP_TO_CUTOFF, USE_FAST_ARCCOS, VALUE_KEY, VOLUME_CONSTRAINT, WARP_ENERGY, WARP_STEP_SIZE, WARP_THRESHOLD, WEIGHT, WIDTH_OF_HAIRPIN
 
Constructor Summary
CoordinatesAssigner(ResidueList residueList, double clashDistance, int maxNumberOfClashes, int nTries, Topology topology)
           
CoordinatesAssigner(SymmetricComplex sc, CommandList commands, ResidueList residueList, double clashDistance, int maxNumberOfClashes, int nTries, Topology topology)
           
 
Method Summary
 int clashesWithImages(Coordinates coordinates, double clashDist)
           
private  Coordinates getAtom(CaResidue from, CaResidue current, int direction)
           
private  Coordinates getAtom(CaResidue current, CaResidue from, Loop loop)
           
 int getClashes(Coordinates coordinates, Residue current, ResidueList residueList, double clashDistance)
          Modified by Oren Wolfshtat.
private static double[] getRandomPointAroundCyllinder(Atom from, double radius, int direction, double[] fromXYZ)
           
private static double[] getRandomPointOnSphere(double radius)
          Returns a point on a sphere (more precisely, on a shell) of a given radius.
private static double[] getRandomPointOnSphereBiasDirection(double radius, double[] fromXYZ, double[] from2XYZ)
           
private  Residue getTo(int direction)
           
private  Residue getTo(Residue from, int lastAtom, int direction)
           
private  Residue getToNull(int from, int lastAtom, int direction)
           
private static double magnitude(double[] vector)
           
private static void normalize(double[] fromsVector)
           
 void step()
           
private  void tryToGenerateNewAtomLeft(CaResidue currentResidue)
           
private  void tryToGenerateNewAtomRight(CaResidue currentResidue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxNumberOfClashes

private int maxNumberOfClashes

CA_CA_DISTANCE

public static final double CA_CA_DISTANCE
See Also:
Constant Field Values

CA_CA_DISTANCE2

public static final double CA_CA_DISTANCE2
See Also:
Constant Field Values

DELTA_ANGLE

public static double DELTA_ANGLE

DISTANCE_BetweenLoops

public static double DISTANCE_BetweenLoops

isDistanceBetweenLoops

public static boolean isDistanceBetweenLoops

nLoops

public final int nLoops
See Also:
Constant Field Values

residueList

private ResidueList residueList

currentResidueIndex

private static int currentResidueIndex

size

private int size

sizeMinusOne

private int sizeMinusOne

sizeMinusTwo

private int sizeMinusTwo

nTries

private int nTries

clashDistance

private double clashDistance

topology

private Topology topology

loops

private Loop[] loops

LOOP2_IN_BARREL_RESIDUES

private final int[] LOOP2_IN_BARREL_RESIDUES

LOOP1_IN_BARREL_RESIDUES

private final int[] LOOP1_IN_BARREL_RESIDUES

gj

private SymmetricComplex gj

outerBarrelOuterR

private double outerBarrelOuterR

outerBarrelInnerR

private double outerBarrelInnerR

outerBarrelHeight

private double outerBarrelHeight

innerBarrelOuterR

private double innerBarrelOuterR

innerBarrelInnerR

private double innerBarrelInnerR

innerBarrelHeight

private double innerBarrelHeight

angleXfrom

static double angleXfrom

angleXto

static double angleXto

angleZfrom

static double angleZfrom

angleZto

static double angleZto

isSteps

static boolean isSteps

toConstrict

static boolean toConstrict

isStrictClashes

static boolean isStrictClashes

transformations

private java.util.List<Transformation> transformations
Constructor Detail

CoordinatesAssigner

public CoordinatesAssigner(SymmetricComplex sc,
                           CommandList commands,
                           ResidueList residueList,
                           double clashDistance,
                           int maxNumberOfClashes,
                           int nTries,
                           Topology topology)

CoordinatesAssigner

public CoordinatesAssigner(ResidueList residueList,
                           double clashDistance,
                           int maxNumberOfClashes,
                           int nTries,
                           Topology topology)
Method Detail

step

public void step()

tryToGenerateNewAtomLeft

private void tryToGenerateNewAtomLeft(CaResidue currentResidue)

tryToGenerateNewAtomRight

private void tryToGenerateNewAtomRight(CaResidue currentResidue)

getAtom

private Coordinates getAtom(CaResidue from,
                            CaResidue current,
                            int direction)

getTo

private Residue getTo(int direction)

getTo

private Residue getTo(Residue from,
                      int lastAtom,
                      int direction)

getToNull

private Residue getToNull(int from,
                          int lastAtom,
                          int direction)

getAtom

private Coordinates getAtom(CaResidue current,
                            CaResidue from,
                            Loop loop)

getRandomPointOnSphereBiasDirection

private static double[] getRandomPointOnSphereBiasDirection(double radius,
                                                            double[] fromXYZ,
                                                            double[] from2XYZ)

normalize

private static void normalize(double[] fromsVector)

magnitude

private static double magnitude(double[] vector)

getRandomPointOnSphere

private static double[] getRandomPointOnSphere(double radius)
Returns a point on a sphere (more precisely, on a shell) of a given radius. Azimuth is uniformly chosen from the range of [-PI,+PI]; angle is chosen from the range of [-PI/2,+PI/2], but uniformly sampling the angle causes bias to the poles. Instead, one call to ArcCos.acos is used to uniformly sample a point on the sphere. Transforming the azimuth and angle to cartesian coordinates takes two calls to Math.sin and Math.cos, each.

For further details on uniformly sampling points on a shell see, for example, Kuffner, Effective Sampling and Distance Metrics for 3D Rigid Body Path Planning, ICRA 2004.


getRandomPointAroundCyllinder

private static double[] getRandomPointAroundCyllinder(Atom from,
                                                      double radius,
                                                      int direction,
                                                      double[] fromXYZ)

getClashes

public int getClashes(Coordinates coordinates,
                      Residue current,
                      ResidueList residueList,
                      double clashDistance)
Modified by Oren Wolfshtat.


clashesWithImages

public int clashesWithImages(Coordinates coordinates,
                             double clashDist)