13 from .
import atomicDominoUtilities
18 def __init__(self, parameterFileName):
19 self.createdMdOptimizer = 0
20 self.fixedNonFlexibleAtoms = 0
21 self.readParameters(parameterFileName)
22 self.wroteNativeProtein = 0
24 def loadHelpers(self):
25 self.loadDockingHelpers()
28 def readParameters(self, parameterFileName):
29 self.parameters = atomicDominoUtilities.readParameters(
33 def loadDockingHelpers(self):
34 mkdirProcess = subprocess.Popen(
37 self.getParam(
'output_directory')],
39 stderr=subprocess.PIPE)
40 _ = mkdirProcess.communicate()
42 self.namesToParticles = atomicDominoUtilities.makeNamesToParticles(
50 def initializeParticleNameDict(self, leaves):
54 name = self.quickParticleName(leaf)
55 particleDict[name] = {}
64 def createModel(self):
66 pdbName = self.getParam(
"native_pdb_input_file")
80 topology = ff.create_topology(self.protein)
81 topology.apply_default_patches()
83 topology.add_atom_types(self.protein)
85 ff.add_radii(self.protein)
86 ff.add_well_depths(self.protein)
88 self.topology = topology
91 def getParam(self, paramName):
92 paramValue = self.parameters[paramName]
96 def quickRestraintName(self, r):
98 ps = r.get_input_particles()
101 if (self.isAtomParticle(p) == 0):
104 if ((self.quickParticleName(p)
in self.flexibleAtoms) == 1):
106 nameList.append(
"%s_%s" % (self.quickParticleName(p), isFlexible))
108 return "%s acting on %s" % (r.get_name(),
" , ".join(nameList))
110 def quickParticleName(self, particle):
111 return atomicDominoUtilities.quickParticleName(particle)
114 def logTime(self, label):
115 nextTime = time.asctime(time.localtime(time.time()))
116 print(
"%s:\t %s" % (label, nextTime))
117 nextTimeEntry = [label, nextTime]
118 self.times.append(nextTimeEntry)
119 self.rawTimes.append(time.time())
122 def outputTimes(self):
123 print(
"Time for each step:")
124 for timeEntry
in self.times:
127 print(
"%s:\t%s" % (label, value))
129 def getFlexibleAtoms(self):
130 return self.flexibleAtoms
133 def getChain(self, particle):
137 chainId = chain.get_id()
141 def getResidue(self, particle):
144 residueNumber = residue.get_index()
147 def isAtomParticle(self, p):
148 return atomicDominoUtilities.isAtomParticle(p)
152 def allFlexibleAtoms(self, r):
153 ps = r.get_input_particles()
155 if (self.isAtomParticle(p) == 0):
157 if ((self.quickParticleName(p)
in self.flexibleAtoms) == 0):
165 def skipNonBondedPair(self, pair):
168 if (self.getResidue(pair[0]) == self.getResidue(pair[1])):
172 if ((self.quickParticleName(pair[0])
in self.flexibleAtoms) == 0
173 and (self.quickParticleName(pair[1])
174 in self.flexibleAtoms) == 0):
183 peptideChain = self.getParam(
"peptide_chain")
184 self.flexibleAtoms = {}
186 if (self.getParam(
"flexible_protein") ==
"yes"):
189 particlePairs = self.getClosePairs()
191 for pair
in particlePairs:
194 p0Chain = self.getChain(p0)
195 p1Chain = self.getChain(p1)
196 if (p0Chain == peptideChain
or p1Chain == peptideChain):
197 self.flexibleAtoms[self.quickParticleName(p0)] = 1
198 self.flexibleAtoms[self.quickParticleName(p1)] = 1
204 if (self.getChain(leaf) == peptideChain):
205 self.flexibleAtoms[self.quickParticleName(leaf)] = 1
206 self.fixNonFlexibleAtoms()
210 def getFixedAtoms(self):
214 leafName = self.quickParticleName(leaf)
215 if (leafName
in self.flexibleAtoms) == 0:
216 fixedAtoms[leafName] = 1
223 def initializeRandomExisting(self):
228 if ((self.quickParticleName(leaf)
in self.flexibleAtoms) == 1):
229 particlesToVary.append(self.quickParticleName(leaf))
230 atomToCoordinates = {}
231 for pName
in particlesToVary:
232 randomPname = random.choice(particlesToVary)
233 randomP = self.namesToParticles[randomPname]
234 print(
"setting coordinates for particle %s to the ones currently "
235 "set for particle %s" % (pName, randomPname))
236 atomToCoordinates[pName] =
IMP.core.XYZ(randomP).get_coordinates()
238 for pName
in particlesToVary:
239 particle = self.namesToParticles[pName]
241 xyz.set_coordinates(atomToCoordinates[pName])
247 def setInitialPositions(self):
248 initialPositionMethod = self.getParam(
"initial_position_method")
253 if (initialPositionMethod ==
"random"):
255 myRandom = random.random()
256 initialOffset = float(
257 self.getParam(
"initial_atom_offset")) + myRandom
258 for particleName
in self.flexibleAtoms.keys():
259 p = self.namesToParticles[particleName]
261 coordinates = xyzDecorator.get_coordinates()
267 xyzDecorator.set_coordinates(randomXyz)
271 elif (initialPositionMethod ==
"random_existing"):
272 print(
"start random existing")
273 xyzs = self.initializeRandomExisting()
277 elif (initialPositionMethod ==
"random_existing_box"):
278 xyzs = self.initializeRandomExisting()
279 initialOffset = float(self.getParam(
"initial_atom_offset"))
280 for xyzDecorator
in xyzs:
281 coordinates = xyzDecorator.get_coordinates()
286 xyzDecorator.set_coordinates(randomXyz)
288 elif (initialPositionMethod ==
"random_box"):
298 for firstPname
in self.nonBondedPairs.keys():
299 secondPnames = self.nonBondedPairs[firstPname]
300 for secondPname
in secondPnames.keys():
301 if ((secondPname
in self.flexibleAtoms) == 0):
302 fixedAtom = self.namesToParticles[firstPname]
305 print(
"added next close atom %s to bounding box "
306 "particles" % firstPname)
309 peptideParticles = []
312 if (self.getChain(leaf) == self.getParam(
"peptide_chain")):
317 fixedAtoms = self.getFixedAtoms()
318 for flexPname
in self.flexibleAtoms.keys():
320 flexParticle = self.namesToParticles[flexPname]
322 print(
"processing position for pname %s" % flexPname)
323 while goodPosition == 0:
325 flexXyzDecorator.set_coordinates(
327 for fixedPname
in fixedAtoms.keys():
328 fixedParticle = self.namesToParticles[fixedPname]
333 print(
"finding new position for %s" % flexPname)
341 elif (initialPositionMethod ==
"random_full"):
342 bb = IMP.atom.get_bounding_box(self.protein)
343 for particleName
in self.flexibleAtoms.keys():
344 print(
"creating random position for particle %s"
346 p = self.namesToParticles[particleName]
349 myRandom = random.random()
351 xyzDecorator.set_coordinates(randomXyz)
355 elif (initialPositionMethod ==
"file"):
357 initialPositionFile = self.getParam(
"saved_initial_atom_positions")
358 print(
"reading initial positions from %s" % initialPositionFile)
365 for initialLeaf
in initialLeaves:
366 name = self.quickParticleName(initialLeaf)
367 if ((name
in self.namesToParticles) == 1):
368 existingLeaf = self.namesToParticles[name]
371 existingLeafXyz.set_coordinates(
372 initialLeafXyz.get_coordinates())
374 print(
"Read in initial positions from file %s but this "
375 "file contained particle %s which is not in current "
376 "model" % (initialPositionFile, name))
378 print(
"Please specify valid initial position method "
379 "(random or file)\n")
383 outputDir = self.getParam(
"output_directory")
384 initialAtomPositionFile = self.getParam(
385 "initial_atom_positions_output_file")
386 fullOutputFile = os.path.join(outputDir, initialAtomPositionFile)
387 print(
"writing output to file %s" % fullOutputFile)
391 initialScore = self.model.evaluate(
False)
392 print(
"initial score for model is %s" % initialScore)
395 def getNonBondedPairs(self):
396 nonBondedDefinition = self.getParam(
"non_bonded_definition")
398 if (nonBondedDefinition ==
"close_pairs"):
399 particlePairs = self.getClosePairs()
400 elif (nonBondedDefinition ==
"random"):
401 particlePairs = self.getRandomParticlePairs()
405 print(
"Please specify valid non bonded pair definition")
410 def getXyzDistance(self, pair):
418 def getClosePairs(self):
423 closePairDistance = float(self.getParam(
"close_pair_distance"))
426 useHardCutoff = self.getParam(
"use_hard_distance_cutoff")
430 self.model.evaluate(
False)
432 particlePairs = nbl.get_particle_pairs()
434 for pair
in particlePairs:
435 distance = self.getXyzDistance(pair)
437 if (useHardCutoff ==
"0"
438 or (useHardCutoff ==
"1"
439 and distance < closePairDistance)):
440 finalPairs.append([pair[0], pair[1]])
445 def addForceFieldRestraints(self):
447 useForcefieldRestraints = self.getParam(
"use_forcefield_restraints")
448 if (useForcefieldRestraints ==
"1"):
456 bonds = self.topology.add_bonds(self.protein)
457 angles = ff.create_angles(bonds)
458 dihedrals = ff.create_dihedrals(bonds)
459 impropers = self.topology.add_impropers(self.protein)
463 self.ffParticleGroups = self.initializeParticleNameDict(
466 self.createForceFieldRestraintsForModel(
474 self.createForceFieldRestraintsForModel(
482 self.createForceFieldRestraintsForModel(
485 "Dihedral Restraints",
487 self.createForceFieldRestraintsForModel(
490 "Improper Restraints",
497 print(
"Skipping forcefield restraints")
502 def createForceFieldRestraintsForModel(
509 maxForceFieldScore = float(self.getParam(
"max_forcefield_score"))
511 cont.add_particles(ffParticles)
513 singletonScore, cont, restraintName)
517 decomposedRestraintTemp = listBondRestraint.create_decomposition()
518 decomposedRestraints = IMP.RestraintSet.get_from(
519 decomposedRestraintTemp)
522 del listBondRestraint
524 count = decomposedRestraints.get_number_of_restraints()
525 for i
in range(count):
527 r = decomposedRestraints.get_restraint(i)
529 if (self.allFlexibleAtoms(r) == 1):
531 self.model.add_restraint(r)
532 r.set_maximum_score(maxForceFieldScore)
533 self.addParticlesToGroups(r)
538 def addParticlesToGroups(self, r):
540 ps = r.get_input_particles()
545 if (self.isAtomParticle(p) == 0):
547 inputParticles.append(p.get_name())
549 for firstName
in inputParticles:
550 for secondName
in inputParticles:
551 if (firstName == secondName):
553 self.ffParticleGroups[firstName][secondName] = 1
558 def addExcludedVolumeRestraints(self):
560 restrainedParticles = atomicDominoUtilities.getRestrainedParticles(
561 self.protein, self.model, self.namesToParticles)
565 self.model.add_restraint(evr)
570 def addFlexFlexLjRestraints(self, scalingFactor):
571 if (self.initializedFlexFlexLjRestraints == 0):
572 print(
"adding initial lennard jones restraints between pairs "
574 self.initializedFlexFlexLjRestraints = 1
579 for i
in range(len(leaves)):
581 for j
in range(i + 1, len(leaves)):
583 if ((self.quickParticleName(iLeaf)
in self.flexibleAtoms)
585 (self.quickParticleName(jLeaf)
in self.flexibleAtoms)
588 ps, [iLeaf, jLeaf],
"LennardJones %s_%s" %
590 self.model.add_restraint(ljpr)
591 print(
"scaling atomic radii by scaling factor %s" % scalingFactor)
593 self.ff.add_radii(self.protein)
594 for pName
in self.flexibleAtoms.keys():
595 particle = self.namesToParticles[pName]
597 radius = xyzr.get_radius()
598 radius *= scalingFactor
599 xyzr.set_radius(radius)
603 def addFixedFlexibleLjRestraints(self):
604 print(
"adding initial fixed flexible lj restraints")
605 fixedAtoms = self.getFixedAtoms()
609 for flexPname
in self.flexibleAtoms.keys():
610 flexParticle = self.namesToParticles[flexPname]
611 for fixedPname
in fixedAtoms.keys():
612 fixedParticle = self.namesToParticles[fixedPname]
614 ps, [fixedParticle, flexParticle],
"LennardJones %s_%s" %
615 (flexPname, fixedPname))
616 self.model.add_restraint(ljpr)
619 def createDopeRestraint(self, pair):
620 q0 = self.quickParticleName(pair[0])
621 q1 = self.quickParticleName(pair[1])
623 prName =
"NonBonded %s_%s" % (q0, q1)
625 self.dopePairScore, pair, prName)
628 self.model.add_restraint(pairRestraint)
629 maxNonBondedScore = float(self.getParam(
"max_non_bonded_score"))
630 pairRestraint.set_maximum_score(maxNonBondedScore)
635 def addClosePairNonBondedRestraints(self):
636 particlePairs = self.getNonBondedPairs()
638 nonBondedRestraintType = self.getParam(
"non_bonded_restraint_type")
639 dopeCutoff = float(self.getParam(
"dope_cutoff"))
644 if (nonBondedRestraintType ==
"dope"):
647 self.dopePairScore = ps
649 self.nonBondedPairs = self.initializeParticleNameDict(
651 for pair
in particlePairs:
653 if (self.skipNonBondedPair(pair) == 1):
656 self.createDopeRestraint(pair)
659 self.nonBondedPairs[self.quickParticleName(pair[0])][
660 self.quickParticleName(pair[0])] = 1
661 self.nonBondedPairs[self.quickParticleName(pair[1])][
662 self.quickParticleName(pair[1])] = 1
664 print(
"Added %s non-bonded restraints" % nonBondedCount)
665 self.model.evaluate(
False)
667 def addCompleteNonBondedRestraints(self):
671 for i
in range(len(leaves)):
673 for j
in range(i + 1, len(leaves)):
676 if ((self.quickParticleName(jLeaf)
677 in self.nonBondedPairs[self.quickParticleName(iLeaf)])
680 if (self.skipNonBondedPair([iLeaf, jLeaf]) == 1):
683 self.createDopeRestraint([iLeaf, jLeaf])
688 print(
"added %s restraints for %s particles" % (counter, len(leaves)))
689 self.model.evaluate(
False)
692 def writeAllRestraints(self):
693 print(
"write all restraints:")
695 print(self.quickRestraintName(r))
698 def initializeMdSchedule(self):
699 schedule = self.getParam(
"md_schedule")
700 stages = schedule.split()
703 print(
"unpacking stage %s" % stage)
704 [steps, temperature, excludedVolume] = stage.split(
'_')
705 totalSteps += int(steps)
706 self.totalMdSteps = totalSteps
707 self.mdStages = stages
712 def createMdRootHandle(self):
715 outputDir = self.getParam(
"output_directory")
717 if (self.getParam(
"read_assignments_from_file") ==
"no"):
719 mdFileName = self.getParam(
"md_trajectory_output_file")
720 fileName = os.path.join(outputDir, mdFileName)
721 print(
"creating rmf file with filename %s" % fileName)
722 rh = RMF.create_rmf_file(fileName)
729 mdFileName = self.getParam(
"saved_md_filename")
731 rh = RMF.open_rmf_file(mdFileName)
732 IMP.rmf.set_hierarchies(rh, [self.protein])
736 def evaluateModel(self):
737 return self.model.evaluate(
False)
739 def loadMdHelpers(self):
741 self.createMdRootHandle()
743 self.createMdOptimizer()
745 self.addMdOptimizerStates()
747 self.initializeMdSchedule()
749 self.createdMdOptimizer = 1
752 def createMdOptimizer(self):
753 print(
"creating md object")
758 md.set_velocity_cap(100.0)
759 self.mdOptimizer = md
761 def addMdOptimizerStates(self):
770 hdos = IMP.rmf.SaveHierarchyConfigurationOptimizerState(
771 [self.protein], self.rootHandle)
772 self.mdOptimizer.add_optimizer_state(hdos)
777 def readTrajectories(self):
779 cgFileName = self.getParam(
"cg_output_file")
780 bestCgScore = 10000000
782 bestCgRmsd = 10000000
785 outputDir = self.getParam(
"output_directory")
786 trajectoryFile = self.getParam(
"md_trajectory_output_file")
787 fullFile = os.path.join(outputDir, trajectoryFile)
788 rh = RMF.open_rmf_file(fullFile)
789 IMP.rmf.set_hierarchies(rh, [self.protein])
790 framesToRead = atomicDominoUtilities.getMdIntervalFrames(
791 rh, int(self.getParam(
"cg_interval")), self.protein)
793 if (len(framesToRead) > 0):
794 for cgNumber
in framesToRead:
796 outputDir = self.getParam(
"output_directory")
797 fullCgFileName = os.path.join(
799 (cgFileName, cgNumber))
800 rh = RMF.open_rmf_file(fullCgFileName)
801 IMP.rmf.set_hierarchies(rh, [self.protein])
803 frameCount = IMP.rmf.get_number_of_frames(rh, self.protein)
805 score = self.model.evaluate(
False)
806 rmsd = self.calculateNativeRmsd(self.flexibleAtoms)
807 print(
"cg number %s has score %s rmsd %s"
808 % (cgNumber, score, rmsd))
809 if (score < bestCgScore):
811 bestCgScoreFile = fullCgFileName
812 if (rmsd < bestCgRmsd):
814 bestCgRmsdFile = fullCgFileName
817 self.singlePdbResults(
820 self.getParam(
"best_cg_score_output_file"))
821 self.singlePdbResults(
824 self.getParam(
"best_cg_rmsd_output_file"))
825 self.singlePdbResults(
826 "%s%s" % (cgFileName, framesToRead[-1]),
827 -1, self.getParam(
"final_cg_frame_output_file"))
828 finalCgRmsd = self.calculateNativeRmsd(self.flexibleAtoms)
829 self.bestCgScore = bestCgScore
830 self.bestCgRmsd = bestCgRmsd
831 self.finalCgRmsd = finalCgRmsd
833 def singlePdbResults(self, trajectoryFile, frame, outputPdbFile):
835 fullTrajectoryFile = os.path.join(
836 self.getParam(
"output_directory"),
838 fullOutputFile = os.path.join(
839 self.getParam(
"output_directory"),
841 rh = RMF.open_rmf_file(fullTrajectoryFile)
842 IMP.rmf.set_hierarchies(rh, [self.protein])
844 frame = IMP.rmf.get_number_of_frames(rh, self.protein) - 1
848 def calculateRmsd(self, otherProtein, flexibleAtoms):
849 otherNamesToParticles = atomicDominoUtilities.makeNamesToParticles(
853 for pName
in otherNamesToParticles.keys():
854 if ((pName
in flexibleAtoms) == 0):
856 otherParticle = otherNamesToParticles[pName]
857 modelParticle = self.namesToParticles[pName]
865 def calculateNativeRmsd(self, flexibleAtoms):
867 if (self.wroteNativeProtein == 0):
868 pdbName = self.getParam(
"native_pdb_input_file")
874 self.wroteNativeProtein = 1
876 return self.calculateRmsd(self.nativeProtein, flexibleAtoms)
879 def runMolecularDynamics(self):
880 self.initializedFlexFlexLjRestraints = 0
881 if (self.fixedNonFlexibleAtoms == 0):
882 print(
"error: before running md, must fix non flexible atoms")
885 for stage
in self.mdStages:
886 [steps, temperature, excludedVolume] = stage.split(
'_')
887 stepsSoFar += int(steps)
888 self.vsos.set_temperature(int(temperature))
891 if excludedVolume ==
"1":
892 self.addFixedFlexibleLjRestraints()
893 elif (excludedVolume !=
"0"):
895 if (self.getParam(
"excluded_volume_type") ==
"lj"):
896 self.addFlexFlexLjRestraints(float(excludedVolume))
897 elif (self.getParam(
"excluded_volume_type") ==
"ev"):
900 self.addExcludedVolumeRestraints()
902 "please set excluded_volume_type to either lj or ev"
904 print(
"running md at temperature %s for %s steps"
905 % (temperature, steps))
906 self.mdOptimizer.optimize(int(steps))
915 print(
"model score after stage %s is %s"
916 % (stage, self.model.evaluate(
False)))
917 print(
"done running md")
920 cgInterval = int(self.getParam(
"cg_interval"))
921 outputDir = self.getParam(
"output_directory")
922 trajectoryFile = self.getParam(
"md_trajectory_output_file")
923 fullFile = os.path.join(outputDir, trajectoryFile)
924 print(
"open rmf %s" % fullFile)
925 rh = RMF.open_rmf_file(fullFile)
926 IMP.rmf.set_hierarchies(rh, [self.protein])
927 framesToRead = atomicDominoUtilities.getMdIntervalFrames(
928 rh, cgInterval, self.protein)
930 for i
in framesToRead:
931 cgFileName =
"%s%s" % (self.getParam(
"cg_output_file"), i)
932 self.applyCg(i, cgFileName)
936 def applyCg(self, mdStepStart, cgFileName):
938 cgSteps = int(self.getParam(
"cg_steps"))
941 print(
"apply cg: loading md frame for cg step start %s" % mdStepStart)
945 outputDir = self.getParam(
"output_directory")
946 fileName = os.path.join(outputDir, cgFileName)
947 print(
"creating cg hdf5 file %s" % fileName)
948 rh = RMF.create_rmf_file(fileName)
954 firstScore = self.model.evaluate(
False)
956 print(
"creating optimizer state")
957 hdos = IMP.rmf.SaveHierarchyConfigurationOptimizerState(
959 hdos.set_skip_steps(0)
961 cg.add_optimizer_state(hdos)
965 secondScore = self.model.evaluate(
False)
966 print(
"cg score after md step %s before %s after %s"
967 % (mdStepStart, firstScore, secondScore))
971 def fixNonFlexibleAtoms(self):
972 if (self.createdMdOptimizer == 0):
973 self.createMdOptimizer()
978 self.fixedNonFlexibleAtoms = 1
981 if ((self.quickParticleName(leaf)
in self.flexibleAtoms) == 0):
983 xyzDecorator.set_coordinates_are_optimized(0)
985 def writeOutput(self):
987 flexiblePeptideAtoms = 0
988 flexibleProteinAtoms = 0
989 fixedPeptideAtoms = 0
990 fixedProteinAtoms = 0
993 if ((self.quickParticleName(leaf)
in self.flexibleAtoms) == 0):
994 if (self.getChain(leaf) == self.getParam(
"peptide_chain")):
995 fixedPeptideAtoms += 1
997 fixedProteinAtoms += 1
999 if (self.getChain(leaf) == self.getParam(
"peptide_chain")):
1000 flexiblePeptideAtoms += 1
1002 flexibleProteinAtoms += 1
1003 print(
"Flexible peptide atoms: %s" % flexiblePeptideAtoms)
1004 print(
"Fixed peptide atoms: %s" % fixedPeptideAtoms)
1005 print(
"Flexible protein atoms: %s" % flexibleProteinAtoms)
1006 print(
"Fixed protein atoms: %s" % fixedProteinAtoms)
1008 def writeOsOutput(self):
1010 print(
"Best cg score: %s" % self.bestCgScore)
1011 print(
"best cg rmsd: %s" % self.bestCgRmsd)
1012 print(
"final cg rmsd: %s" % self.finalCgRmsd)
def __init__
Create Jeffreys prior.
Applies a SingletonScore to each Singleton in a list.
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 simulator.
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.