system = System() system.add(qmff) system.add(intraff) system.add(intraclj) system.add(solute) print(system.energy()) chg_constraint = QMChargeConstraint(solute) chg_constraint.setChargeCalculator( AM1BCC() ) system.add(chg_constraint) print(system.constraintsSatisfied()) print(system.energy()) print(system.constraintsSatisfied()) mol = system[ MGIdx(0) ][ mol.number() ].molecule() print(mol.property("charge").array()) water = PDB().read("test/io/water.pdb") tip4p = water[ MolIdx(0) ].molecule() tip4p = protoms.parameterise(tip4p, ProtoMS.SOLVENT) chgs = tip4p.property("charge")
mol = mol.edit().rename("SB2").commit() mol = protoms.parameterise(mol, ProtoMS.SOLUTE) perturbations = mol.property("perturbations") print(perturbations) print(perturbations.requiredSymbols()) print(perturbations.requiredProperties()) lam = perturbations.symbols().Lambda() system = System() solute = MoleculeGroup("solute", mol) system.add(solute) system.setConstant(lam, 0.0) system.add( PerturbationConstraint(solute) ) print(system.constraintsSatisfied()) for i in range(0,101,10): system.setConstant(lam, 0.01 * i) PDB().write(system.molecules(), "test_%003d.pdb" % i)