<jupyter_start><jupyter_text>Villin subdomain HP-35<jupyter_code>import molsysmt as msm
molsys = msm.convert('pdbid:1VII')
molsys = msm.build.remove_hydrogens(molsys)
molsys = msm.build.add_terminal_cappings(molsys, N_terminal='ACE', C_terminal='NME')
msm.convert(molsys, to_form='villin_hp35.pdb')
from openmm.app import PDBFile, Modeller, ForceField, PME, HBonds, Simulation, StateDataReporter, DCDReporter
from openmm import unit, Vec3, LangevinIntegrator, Platform
import numpy as np
from sys import stdout
pdb = PDBFile('villin_hp35.pdb')
modeller = Modeller(pdb.topology, pdb.positions)
modeller.topology
forcefield = ForceField("amber14-all.xml", "amber14/tip3p.xml")
_ = modeller.addHydrogens(forcefield, pH=7.4)
modeller.topology
clearance = 14.0*unit.angstroms
max_size = max(max((pos[i] for pos in modeller.positions))-min((pos[i] for pos in modeller.positions)) for i in range(3))
vectors = Vec3(1.0, 0, 0), Vec3(1.0/3.0, 2.0*np.sqrt(2.0)/3.0,0.0), Vec3(-1.0/3.0, np.sqrt(2.0)/3.0, np.sqrt(6.0)/3.0)
box_vectors = [(max_size+clearance)*v for v in vectors]

modeller.addSolvent(forcefield, model='tip3p', boxVectors = box_vectors, ionicStrength=0.0*unit.molar,
                    positiveIon='Na+', negativeIon='Cl-')
modeller.topology
modeller.topology.getPeriodicBoxVectors()
system = forcefield.createSystem(modeller.topology, nonbondedMethod=PME, nonbondedCutoff=1.2*unit.nanometer, constraints=HBonds)
integrator = LangevinIntegrator(300*unit.kelvin, 1.0/unit.picosecond, 2.0*unit.femtoseconds)
platform = Platform.getPlatformByName('CUDA')
simulation = Simulation(modeller.topology, system, integrator, platform)
simulation.context.setPositions(modeller.positions)
simulation.minimizeEnergy()
simulation.reporters.append(StateDataReporter(stdout, 1000, step=True, potentialEnergy=True, temperature=True))
simulation.step(10000)
simulation.context.setTime=0.0*unit.picoseconds
simulation.reporters=[]
simulation.reporters.append(StateDataReporter(stdout, 50000, step=True, potentialEnergy=True, temperature=True))
simulation.reporters.append(DCDReporter('traj.dcd', 50000))
simulation.step(1000000)
pdb = PDBFile('input_exercise2.pdb')
forcefield = ForceField('amber99sb.xml', 'amber99_obc.xml')
print "Building Model.."
modeller = Modeller(pdb.topology, pdb.positions)
print('Adding hydrogens...')
modeller.addHydrogens(forcefield)
print "Creating System"
system = forcefield.createSystem(modeller.topology, constraints=HBonds)
integrator = LangevinIntegrator(300*kelvin, 91/picosecond, 0.002*picoseconds)
simulation = Simulation(modeller.topology, system, integrator)
print "Using Platform:", simulation.context.getPlatform().getName()
simulation.context.setPositions(modeller.positions)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13450292397660818, 'fraction_numerical': 0.038011695906432746, 'mean_word_length': 7.80064308681672, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '596929', 'license': 'MIT', 'n_tokens_mistral': 1065, 'n_tokens_neox': 973, 'n_words': 161, 'path': 'docs/contents/demo/villin_hp35_2.ipynb', 'repo_name': 'dprada/molsysmt', 'size': '2736'}