Functions and classes for Prime molecule preparation.

It is deprecated as starting with Suite2008, Prime no longer needs structure “pre-fixing”.

The wrapper for this module is in: $SCHRODINGER/mmshare-v*/python/scripts/

Copyright Schrodinger, LLC. All rights reserved.

Returns True if the supplied atomic_number is for a metal.

Ev:58049 For the specified atom, counts the number of bonds to it, and if that number doesn’t not match with the formal charge for the atom, the formal charge will be adjusted. Assumes that hydrogens have been added already


Bases: object

Wrapper class to house the combination of methods for fixing a structure for Prime.

Raises RuntimeError if it can’t determine a chain name, or general Exception if can’t name a hydrogen because of PDB atom name field size restrictions.

Call instance.fixAll() after creating the instance to drive all fixing methods.


Sets bond order between all metals and other atoms to 0 and gives the metal a new residue number and name. Also sets the charges of metals to appropriate values. For Iron-sulfur clusters, sets the charge of iron to +3 and the charge of sulfurs to -1. Optionally corrects the metal pdbnames.

Also every -SH that is within 3A of a metal is marked with a negative charge and gets its hydrogen removed.


Assigns PDB atom names, and charges for residue names:


Changes residue name from DOD, TIP, or SPC to HOH


Prime atom parameters need to be different for terminal DNA bases than the atom parameters for the DNA bases that are in the center of the string. This is accomplished by giving terminal bases a new residue name. Ev:60484

XHL is the 5’ cap (-OH bound to the phosphate of the base) POT is the 3’ cap (a phosphate cap)

Protocol: Find all XHL&POT caps and rename the cap and the residue bound to it


Assign chain, pdbres, and resnum to het groups. Raises RuntimeError if it can’t determine a chain name, or general Exception if can’t name a hydrogen because of PDB atom name field size restrictions.


Assigns new residue numbers as needed, making sure a residue number only appears in a chain once. self.reassign_resnum currently contains only a list of metals to which bonds were broken.


Break up the structure into multiple structures - one molecule each Recombined the structures into one, adding a molecule at a time. The purpose of this is so that all atoms from each molecule appear together in the connection table.


Justifies PDB residue name. Changes all PDB atom names to upper case.


Calls reassignHets on identified het atoms.


Driver method that makes all the fixes.

Preferred way to use the FixForPrime class.

Fixes structure.Structure for Prime calculations. This is the preferred API for scripts implementing

  1. Assign a unique, single residue name, residue number, and chain name to all ligand residues. Make sure that new name doesn’t conflict with amino acid resname. Back up the old residue name as s_ppw_resname_bu, s_ppw_resnum_bu

  2. Left-justify the 3-character residue name.

  3. Set pdbname to all upper case.

  4. Delete all bonds to metals and assign formal charges to the metal and previously attached atoms.

  5. Water molecules should have a residue name of “HOH ” and pdb atom names ” O “, “1H ” and “2H “. Currently, residues TIP, TIP3, TIP4, SPC, and HOH and DOD are treated.

  6. FeS clusters are fixed with the appropriate bonds anf formal charges.

  7. Terminal caps are fixed (rename “NME ” to “NMA “, pdbname ” C ” of NMA to ” CA “, and pdbname ” CA ” of ACE to ” CH3”).

  8. Atoms from the same molecule are placed together in the connection table.

NOTE: Prime can still fail if a residue is not in order of connectivity. If this is the case in your structure, it should be exported as a PDB file and then reimported as a Maestro file before running this script.