1 from __future__
import print_function
14 from .
import atomicDominoUtilities
19 def __init__(self, parameterFileName):
20 self.createdMdOptimizer = 0
21 self.fixedNonFlexibleAtoms = 0
22 self.readParameters(parameterFileName)
23 self.wroteNativeProtein = 0
25 def loadHelpers(self):
26 self.loadDockingHelpers()
29 def readParameters(self, parameterFileName):
30 self.parameters = atomicDominoUtilities.readParameters(
34 def loadDockingHelpers(self):
35 mkdirProcess = subprocess.Popen(
38 self.getParam(
'output_directory')],
40 stderr=subprocess.PIPE)
41 _ = mkdirProcess.communicate()
43 self.namesToParticles = atomicDominoUtilities.makeNamesToParticles(
51 def initializeParticleNameDict(self, leaves):
55 name = self.quickParticleName(leaf)
56 particleDict[name] = {}
65 def createModel(self):
67 pdbName = self.getParam(
"native_pdb_input_file")
81 topology = ff.create_topology(self.protein)
82 topology.apply_default_patches()
84 topology.add_atom_types(self.protein)
86 ff.add_radii(self.protein)
87 ff.add_well_depths(self.protein)
89 self.topology = topology
92 def getParam(self, paramName):
93 paramValue = self.parameters[paramName]
97 def quickRestraintName(self, r):
99 ps = r.get_input_particles()
102 if (self.isAtomParticle(p) == 0):
105 if ((self.quickParticleName(p)
in self.flexibleAtoms) == 1):
107 nameList.append(
"%s_%s" % (self.quickParticleName(p), isFlexible))
109 return "%s acting on %s" % (r.get_name(),
" , ".join(nameList))
111 def quickParticleName(self, particle):
112 return atomicDominoUtilities.quickParticleName(particle)
115 def logTime(self, label):
116 nextTime = time.asctime(time.localtime(time.time()))
117 print(
"%s:\t %s" % (label, nextTime))
118 nextTimeEntry = [label, nextTime]
119 self.times.append(nextTimeEntry)
120 self.rawTimes.append(time.time())
123 def outputTimes(self):
124 print(
"Time for each step:")
125 for timeEntry
in self.times:
128 print(
"%s:\t%s" % (label, value))
130 def getFlexibleAtoms(self):
131 return self.flexibleAtoms
134 def getChain(self, particle):
138 chainId = chain.get_id()
142 def getResidue(self, particle):
145 residueNumber = residue.get_index()
148 def isAtomParticle(self, p):
149 return atomicDominoUtilities.isAtomParticle(p)
153 def allFlexibleAtoms(self, r):
154 ps = r.get_input_particles()
156 if (self.isAtomParticle(p) == 0):
158 if ((self.quickParticleName(p)
in self.flexibleAtoms) == 0):
166 def skipNonBondedPair(self, pair):
169 if (self.getResidue(pair[0]) == self.getResidue(pair[1])):
173 if ((self.quickParticleName(pair[0])
in self.flexibleAtoms) == 0
174 and (self.quickParticleName(pair[1])
175 in self.flexibleAtoms) == 0):
184 peptideChain = self.getParam(
"peptide_chain")
185 self.flexibleAtoms = {}
187 if (self.getParam(
"flexible_protein") ==
"yes"):
190 particlePairs = self.getClosePairs()
192 for pair
in particlePairs:
195 p0Chain = self.getChain(p0)
196 p1Chain = self.getChain(p1)
197 if (p0Chain == peptideChain
or p1Chain == peptideChain):
198 self.flexibleAtoms[self.quickParticleName(p0)] = 1
199 self.flexibleAtoms[self.quickParticleName(p1)] = 1
205 if (self.getChain(leaf) == peptideChain):
206 self.flexibleAtoms[self.quickParticleName(leaf)] = 1
207 self.fixNonFlexibleAtoms()
211 def getFixedAtoms(self):
215 leafName = self.quickParticleName(leaf)
216 if (leafName
in self.flexibleAtoms) == 0:
217 fixedAtoms[leafName] = 1
224 def initializeRandomExisting(self):
229 if ((self.quickParticleName(leaf)
in self.flexibleAtoms) == 1):
230 particlesToVary.append(self.quickParticleName(leaf))
231 atomToCoordinates = {}
232 for pName
in particlesToVary:
233 randomPname = random.choice(particlesToVary)
234 randomP = self.namesToParticles[randomPname]
235 print(
"setting coordinates for particle %s to the ones currently "
236 "set for particle %s" % (pName, randomPname))
237 atomToCoordinates[pName] =
IMP.core.XYZ(randomP).get_coordinates()
239 for pName
in particlesToVary:
240 particle = self.namesToParticles[pName]
242 xyz.set_coordinates(atomToCoordinates[pName])
248 def setInitialPositions(self):
249 initialPositionMethod = self.getParam(
"initial_position_method")
254 if (initialPositionMethod ==
"random"):
256 myRandom = random.random()
257 initialOffset = float(
258 self.getParam(
"initial_atom_offset")) + myRandom
259 for particleName
in self.flexibleAtoms.keys():
260 p = self.namesToParticles[particleName]
262 coordinates = xyzDecorator.get_coordinates()
268 xyzDecorator.set_coordinates(randomXyz)
272 elif (initialPositionMethod ==
"random_existing"):
273 print(
"start random existing")
274 xyzs = self.initializeRandomExisting()
278 elif (initialPositionMethod ==
"random_existing_box"):
279 xyzs = self.initializeRandomExisting()
280 initialOffset = float(self.getParam(
"initial_atom_offset"))
281 for xyzDecorator
in xyzs:
282 coordinates = xyzDecorator.get_coordinates()
287 xyzDecorator.set_coordinates(randomXyz)
289 elif (initialPositionMethod ==
"random_box"):
299 for firstPname
in self.nonBondedPairs.keys():
300 secondPnames = self.nonBondedPairs[firstPname]
301 for secondPname
in secondPnames.keys():
302 if ((secondPname
in self.flexibleAtoms) == 0):
303 fixedAtom = self.namesToParticles[firstPname]
306 print(
"added next close atom %s to bounding box "
307 "particles" % firstPname)
310 peptideParticles = []
313 if (self.getChain(leaf) == self.getParam(
"peptide_chain")):
318 fixedAtoms = self.getFixedAtoms()
319 for flexPname
in self.flexibleAtoms.keys():
321 flexParticle = self.namesToParticles[flexPname]
323 print(
"processing position for pname %s" % flexPname)
324 while(goodPosition == 0):
326 flexXyzDecorator.set_coordinates(
328 for fixedPname
in fixedAtoms.keys():
329 fixedParticle = self.namesToParticles[fixedPname]
334 print(
"finding new position for %s" % flexPname)
342 elif (initialPositionMethod ==
"random_full"):
343 bb = IMP.atom.get_bounding_box(self.protein)
344 for particleName
in self.flexibleAtoms.keys():
345 print(
"creating random position for particle %s"
347 p = self.namesToParticles[particleName]
350 myRandom = random.random()
352 xyzDecorator.set_coordinates(randomXyz)
356 elif (initialPositionMethod ==
"file"):
358 initialPositionFile = self.getParam(
"saved_initial_atom_positions")
359 print(
"reading initial positions from %s" % initialPositionFile)
366 for initialLeaf
in initialLeaves:
367 name = self.quickParticleName(initialLeaf)
368 if ((name
in self.namesToParticles) == 1):
369 existingLeaf = self.namesToParticles[name]
372 existingLeafXyz.set_coordinates(
373 initialLeafXyz.get_coordinates())
375 print(
"Read in initial positions from file %s but this "
376 "file contained particle %s which is not in current "
377 "model" % (initialPositionFile, name))
379 print(
"Please specify valid initial position method "
380 "(random or file)\n")
384 outputDir = self.getParam(
"output_directory")
385 initialAtomPositionFile = self.getParam(
386 "initial_atom_positions_output_file")
387 fullOutputFile = os.path.join(outputDir, initialAtomPositionFile)
388 print(
"writing output to file %s" % fullOutputFile)
392 initialScore = self.model.evaluate(
False)
393 print(
"initial score for model is %s" % initialScore)
396 def getNonBondedPairs(self):
397 nonBondedDefinition = self.getParam(
"non_bonded_definition")
399 if (nonBondedDefinition ==
"close_pairs"):
400 particlePairs = self.getClosePairs()
401 elif (nonBondedDefinition ==
"random"):
402 particlePairs = self.getRandomParticlePairs()
406 print(
"Please specify valid non bonded pair definition")
411 def getXyzDistance(self, pair):
419 def getClosePairs(self):
424 closePairDistance = float(self.getParam(
"close_pair_distance"))
427 useHardCutoff = self.getParam(
"use_hard_distance_cutoff")
431 self.model.evaluate(
False)
433 particlePairs = nbl.get_particle_pairs()
435 for pair
in particlePairs:
436 distance = self.getXyzDistance(pair)
438 if (useHardCutoff ==
"0"
439 or (useHardCutoff ==
"1"
440 and distance < closePairDistance)):
441 finalPairs.append([pair[0], pair[1]])
446 def addForceFieldRestraints(self):
448 useForcefieldRestraints = self.getParam(
"use_forcefield_restraints")
449 if (useForcefieldRestraints ==
"1"):
457 bonds = self.topology.add_bonds(self.protein)
458 angles = ff.create_angles(bonds)
459 dihedrals = ff.create_dihedrals(bonds)
460 impropers = self.topology.add_impropers(self.protein)
464 self.ffParticleGroups = self.initializeParticleNameDict(
467 self.createForceFieldRestraintsForModel(
475 self.createForceFieldRestraintsForModel(
483 self.createForceFieldRestraintsForModel(
486 "Dihedral Restraints",
488 self.createForceFieldRestraintsForModel(
491 "Improper Restraints",
498 print(
"Skipping forcefield restraints")
503 def createForceFieldRestraintsForModel(
510 maxForceFieldScore = float(self.getParam(
"max_forcefield_score"))
512 cont.add_particles(ffParticles)
514 singletonScore, cont, restraintName)
518 decomposedRestraintTemp = listBondRestraint.create_decomposition()
519 decomposedRestraints = IMP.RestraintSet.get_from(
520 decomposedRestraintTemp)
523 del listBondRestraint
525 count = decomposedRestraints.get_number_of_restraints()
526 for i
in range(count):
528 r = decomposedRestraints.get_restraint(i)
530 if (self.allFlexibleAtoms(r) == 1):
532 self.model.add_restraint(r)
533 r.set_maximum_score(maxForceFieldScore)
534 self.addParticlesToGroups(r)
539 def addParticlesToGroups(self, r):
541 ps = r.get_input_particles()
546 if (self.isAtomParticle(p) == 0):
548 inputParticles.append(p.get_name())
550 for firstName
in inputParticles:
551 for secondName
in inputParticles:
552 if (firstName == secondName):
554 self.ffParticleGroups[firstName][secondName] = 1
559 def addExcludedVolumeRestraints(self):
561 restrainedParticles = atomicDominoUtilities.getRestrainedParticles(
562 self.protein, self.model, self.namesToParticles)
566 self.model.add_restraint(evr)
571 def addFlexFlexLjRestraints(self, scalingFactor):
572 if (self.initializedFlexFlexLjRestraints == 0):
573 print(
"adding initial lennard jones restraints between pairs "
575 self.initializedFlexFlexLjRestraints = 1
580 for i
in range(len(leaves)):
582 for j
in range(i + 1, len(leaves)):
584 if ((self.quickParticleName(iLeaf)
in self.flexibleAtoms)
586 (self.quickParticleName(jLeaf)
in self.flexibleAtoms)
589 ps, [iLeaf, jLeaf],
"LennardJones %s_%s" %
591 self.model.add_restraint(ljpr)
592 print(
"scaling atomic radii by scaling factor %s" % scalingFactor)
594 self.ff.add_radii(self.protein)
595 for pName
in self.flexibleAtoms.keys():
596 particle = self.namesToParticles[pName]
598 radius = xyzr.get_radius()
599 radius *= scalingFactor
600 xyzr.set_radius(radius)
604 def addFixedFlexibleLjRestraints(self):
605 print(
"adding initial fixed flexible lj restraints")
606 fixedAtoms = self.getFixedAtoms()
610 for flexPname
in self.flexibleAtoms.keys():
611 flexParticle = self.namesToParticles[flexPname]
612 for fixedPname
in fixedAtoms.keys():
613 fixedParticle = self.namesToParticles[fixedPname]
615 ps, [fixedParticle, flexParticle],
"LennardJones %s_%s" %
616 (flexPname, fixedPname))
617 self.model.add_restraint(ljpr)
620 def createDopeRestraint(self, pair):
621 q0 = self.quickParticleName(pair[0])
622 q1 = self.quickParticleName(pair[1])
624 prName =
"NonBonded %s_%s" % (q0, q1)
626 self.dopePairScore, pair, prName)
629 self.model.add_restraint(pairRestraint)
630 maxNonBondedScore = float(self.getParam(
"max_non_bonded_score"))
631 pairRestraint.set_maximum_score(maxNonBondedScore)
636 def addClosePairNonBondedRestraints(self):
637 particlePairs = self.getNonBondedPairs()
639 nonBondedRestraintType = self.getParam(
"non_bonded_restraint_type")
640 dopeCutoff = float(self.getParam(
"dope_cutoff"))
645 if (nonBondedRestraintType ==
"dope"):
648 self.dopePairScore = ps
650 self.nonBondedPairs = self.initializeParticleNameDict(
652 for pair
in particlePairs:
654 if (self.skipNonBondedPair(pair) == 1):
657 self.createDopeRestraint(pair)
660 self.nonBondedPairs[self.quickParticleName(pair[0])][
661 self.quickParticleName(pair[0])] = 1
662 self.nonBondedPairs[self.quickParticleName(pair[1])][
663 self.quickParticleName(pair[1])] = 1
665 print(
"Added %s non-bonded restraints" % nonBondedCount)
666 self.model.evaluate(
False)
668 def addCompleteNonBondedRestraints(self):
672 for i
in range(len(leaves)):
674 for j
in range(i + 1, len(leaves)):
677 if ((self.quickParticleName(jLeaf)
678 in self.nonBondedPairs[self.quickParticleName(iLeaf)])
681 if (self.skipNonBondedPair([iLeaf, jLeaf]) == 1):
684 self.createDopeRestraint([iLeaf, jLeaf])
689 print(
"added %s restraints for %s particles" % (counter, len(leaves)))
690 self.model.evaluate(
False)
693 def writeAllRestraints(self):
694 print(
"write all restraints:")
696 print(self.quickRestraintName(r))
699 def initializeMdSchedule(self):
700 schedule = self.getParam(
"md_schedule")
701 stages = schedule.split()
704 print(
"unpacking stage %s" % stage)
705 [steps, temperature, excludedVolume] = stage.split(
'_')
706 totalSteps += int(steps)
707 self.totalMdSteps = totalSteps
708 self.mdStages = stages
713 def createMdRootHandle(self):
716 outputDir = self.getParam(
"output_directory")
718 if (self.getParam(
"read_assignments_from_file") ==
"no"):
720 mdFileName = self.getParam(
"md_trajectory_output_file")
721 fileName = os.path.join(outputDir, mdFileName)
722 print(
"creating rmf file with filename %s" % fileName)
723 rh = RMF.create_rmf_file(fileName)
730 mdFileName = self.getParam(
"saved_md_filename")
732 rh = RMF.open_rmf_file(mdFileName)
733 IMP.rmf.set_hierarchies(rh, [self.protein])
737 def evaluateModel(self):
738 return self.model.evaluate(
False)
740 def loadMdHelpers(self):
742 self.createMdRootHandle()
744 self.createMdOptimizer()
746 self.addMdOptimizerStates()
748 self.initializeMdSchedule()
750 self.createdMdOptimizer = 1
753 def createMdOptimizer(self):
754 print(
"creating md object")
759 md.set_velocity_cap(100.0)
760 self.mdOptimizer = md
762 def addMdOptimizerStates(self):
771 hdos = IMP.rmf.SaveHierarchyConfigurationOptimizerState(
772 [self.protein], self.rootHandle)
773 self.mdOptimizer.add_optimizer_state(hdos)
778 def readTrajectories(self):
780 cgFileName = self.getParam(
"cg_output_file")
781 bestCgScore = 10000000
783 bestCgRmsd = 10000000
786 outputDir = self.getParam(
"output_directory")
787 trajectoryFile = self.getParam(
"md_trajectory_output_file")
788 fullFile = os.path.join(outputDir, trajectoryFile)
789 rh = RMF.open_rmf_file(fullFile)
790 IMP.rmf.set_hierarchies(rh, [self.protein])
791 framesToRead = atomicDominoUtilities.getMdIntervalFrames(
792 rh, int(self.getParam(
"cg_interval")), self.protein)
794 if (len(framesToRead) > 0):
795 for cgNumber
in framesToRead:
797 outputDir = self.getParam(
"output_directory")
798 fullCgFileName = os.path.join(
800 (cgFileName, cgNumber))
801 rh = RMF.open_rmf_file(fullCgFileName)
802 IMP.rmf.set_hierarchies(rh, [self.protein])
804 frameCount = IMP.rmf.get_number_of_frames(rh, self.protein)
806 score = self.model.evaluate(
False)
807 rmsd = self.calculateNativeRmsd(self.flexibleAtoms)
808 print(
"cg number %s has score %s rmsd %s"
809 % (cgNumber, score, rmsd))
810 if (score < bestCgScore):
812 bestCgScoreFile = fullCgFileName
813 if (rmsd < bestCgRmsd):
815 bestCgRmsdFile = fullCgFileName
818 self.singlePdbResults(
821 self.getParam(
"best_cg_score_output_file"))
822 self.singlePdbResults(
825 self.getParam(
"best_cg_rmsd_output_file"))
826 self.singlePdbResults(
827 "%s%s" % (cgFileName, framesToRead[-1]),
828 -1, self.getParam(
"final_cg_frame_output_file"))
829 finalCgRmsd = self.calculateNativeRmsd(self.flexibleAtoms)
830 self.bestCgScore = bestCgScore
831 self.bestCgRmsd = bestCgRmsd
832 self.finalCgRmsd = finalCgRmsd
834 def singlePdbResults(self, trajectoryFile, frame, outputPdbFile):
836 fullTrajectoryFile = os.path.join(
837 self.getParam(
"output_directory"),
839 fullOutputFile = os.path.join(
840 self.getParam(
"output_directory"),
842 rh = RMF.open_rmf_file(fullTrajectoryFile)
843 IMP.rmf.set_hierarchies(rh, [self.protein])
845 frame = IMP.rmf.get_number_of_frames(rh, self.protein) - 1
849 def calculateRmsd(self, otherProtein, flexibleAtoms):
850 otherNamesToParticles = atomicDominoUtilities.makeNamesToParticles(
854 for pName
in otherNamesToParticles.keys():
855 if ((pName
in flexibleAtoms) == 0):
857 otherParticle = otherNamesToParticles[pName]
858 modelParticle = self.namesToParticles[pName]
866 def calculateNativeRmsd(self, flexibleAtoms):
868 if (self.wroteNativeProtein == 0):
869 pdbName = self.getParam(
"native_pdb_input_file")
875 self.wroteNativeProtein = 1
877 return self.calculateRmsd(self.nativeProtein, flexibleAtoms)
880 def runMolecularDynamics(self):
881 self.initializedFlexFlexLjRestraints = 0
882 if (self.fixedNonFlexibleAtoms == 0):
883 print(
"error: before running md, must fix non flexible atoms")
886 for stage
in self.mdStages:
887 [steps, temperature, excludedVolume] = stage.split(
'_')
888 stepsSoFar += int(steps)
889 self.vsos.set_temperature(int(temperature))
892 if excludedVolume ==
"1":
893 self.addFixedFlexibleLjRestraints()
894 elif (excludedVolume !=
"0"):
896 if (self.getParam(
"excluded_volume_type") ==
"lj"):
897 self.addFlexFlexLjRestraints(float(excludedVolume))
898 elif (self.getParam(
"excluded_volume_type") ==
"ev"):
901 self.addExcludedVolumeRestraints()
903 "please set excluded_volume_type to either lj or ev"
905 print(
"running md at temperature %s for %s steps"
906 % (temperature, steps))
907 self.mdOptimizer.optimize(int(steps))
916 print(
"model score after stage %s is %s"
917 % (stage, self.model.evaluate(
False)))
918 print(
"done running md")
921 cgInterval = int(self.getParam(
"cg_interval"))
922 outputDir = self.getParam(
"output_directory")
923 trajectoryFile = self.getParam(
"md_trajectory_output_file")
924 fullFile = os.path.join(outputDir, trajectoryFile)
925 print(
"open rmf %s" % fullFile)
926 rh = RMF.open_rmf_file(fullFile)
927 IMP.rmf.set_hierarchies(rh, [self.protein])
928 framesToRead = atomicDominoUtilities.getMdIntervalFrames(
929 rh, cgInterval, self.protein)
931 for i
in framesToRead:
932 cgFileName =
"%s%s" % (self.getParam(
"cg_output_file"), i)
933 self.applyCg(i, cgFileName)
937 def applyCg(self, mdStepStart, cgFileName):
939 cgSteps = int(self.getParam(
"cg_steps"))
942 print(
"apply cg: loading md frame for cg step start %s" % mdStepStart)
946 outputDir = self.getParam(
"output_directory")
947 fileName = os.path.join(outputDir, cgFileName)
948 print(
"creating cg hdf5 file %s" % fileName)
949 rh = RMF.create_rmf_file(fileName)
955 firstScore = self.model.evaluate(
False)
957 print(
"creating optimizer state")
958 hdos = IMP.rmf.SaveHierarchyConfigurationOptimizerState(
960 hdos.set_skip_steps(0)
962 cg.add_optimizer_state(hdos)
966 secondScore = self.model.evaluate(
False)
967 print(
"cg score after md step %s before %s after %s"
968 % (mdStepStart, firstScore, secondScore))
972 def fixNonFlexibleAtoms(self):
973 if (self.createdMdOptimizer == 0):
974 self.createMdOptimizer()
979 self.fixedNonFlexibleAtoms = 1
982 if ((self.quickParticleName(leaf)
in self.flexibleAtoms) == 0):
984 xyzDecorator.set_coordinates_are_optimized(0)
986 def writeOutput(self):
988 flexiblePeptideAtoms = 0
989 flexibleProteinAtoms = 0
990 fixedPeptideAtoms = 0
991 fixedProteinAtoms = 0
994 if ((self.quickParticleName(leaf)
in self.flexibleAtoms) == 0):
995 if (self.getChain(leaf) == self.getParam(
"peptide_chain")):
996 fixedPeptideAtoms += 1
998 fixedProteinAtoms += 1
1000 if (self.getChain(leaf) == self.getParam(
"peptide_chain")):
1001 flexiblePeptideAtoms += 1
1003 flexibleProteinAtoms += 1
1004 print(
"Flexible peptide atoms: %s" % flexiblePeptideAtoms)
1005 print(
"Fixed peptide atoms: %s" % fixedPeptideAtoms)
1006 print(
"Flexible protein atoms: %s" % flexibleProteinAtoms)
1007 print(
"Fixed protein atoms: %s" % fixedProteinAtoms)
1009 def writeOsOutput(self):
1011 print(
"Best cg score: %s" % self.bestCgScore)
1012 print(
"best cg rmsd: %s" % self.bestCgRmsd)
1013 print(
"final cg rmsd: %s" % self.finalCgRmsd)
Applies a SingletonScore to each Singleton in a list.
def __init__
Create Jeffreys prior.
Chain get_chain(Hierarchy h)
Get the containing chain or Chain() if there is none.
Score the angle based on a UnaryFunction,.
Simple conjugate gradients optimizer.
void write_pdb(const Selection &mhd, TextOutput out, unsigned int model=1)
Return all close unordered pairs of particles taken from the SingletonContainer.
double get_distance(XYZR a, XYZR b)
Compute the sphere distance between a and b.
void read_pdb(TextInput input, int model, Hierarchy h)
Vector3D get_random_vector_in(const Cylinder3D &c)
Generate a random vector in a cylinder with uniform density.
CHARMM force field parameters.
Class for storing model, its restraints, constraints, and particles.
Maintains temperature during molecular dynamics by velocity scaling.
Select all non-alternative ATOM records.
double get_rmsd(const Selection &s0, const Selection &s1)
void add_hierarchy(RMF::FileHandle fh, atom::Hierarchy hs)
Lennard-Jones score between a pair of particles.
Simple molecular dynamics optimizer.
Store a list of ParticleIndexes.
A decorator for a particle representing an atom.
algebra::BoundingBoxD< 3 > get_bounding_box(const XYZRs &ps)
Get the bounding box.
Score the improper dihedral based on a UnaryFunction,.
RestraintsTemp get_restraints(It b, It e)
void load_frame(RMF::FileConstHandle file, RMF::FrameID frame)
Load the given RMF frame into the state of the linked objects.
A decorator for a particle with x,y,z coordinates.
Score the bond based on a UnaryFunction,.
Basic functionality that is expected to be used by a wide variety of IMP users.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
Residue get_residue(Atom d, bool nothrow=false)
Return the Residue containing this atom.
Prevent a set of particles and rigid bodies from inter-penetrating.
void add_dope_score_data(atom::Hierarchy h)
double get_distance(const VectorD< D > &v1, const VectorD< D > &v2)
Compute the distance between two vectors.
Applies a PairScore to a Pair.
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
Score pair of atoms based on DOPE.
Smooth interaction scores by switching the derivatives (force switch).
Hierarchies get_leaves(const Selection &h)
Support for the RMF file format for storing hierarchical molecular data and markup.
Divide-and-conquer inferential optimization in discrete space.
Score the dihedral angle.
Harmonic function (symmetric about the mean)
A decorator for a particle with x,y,z coordinates and a radius.