<commit_before>package etomica.normalmode;

import etomica.api.IAtomList;
import etomica.api.IBox;
import etomica.api.IVectorMutable;
import etomica.lattice.crystal.Primitive;
import etomica.potential.Potential1;
import etomica.space.ISpace;

public class P1Constraint extends Potential1{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public P1Constraint(ISpace space, Primitive primitive, IBox box, CoordinateDefinition coordinateDefinition) {
		super(space);
		
		siteIndex = box.getLeafList().getAtomCount();
		latticeSite = space.makeVectorArray(siteIndex);
				
		double neighborRadius = primitive.getSize()[0];
		
		if(box.getLeafList().getAtomCount()==32){
			radiusInner = neighborRadius*neighborRadius/32;
			
		} else {
			radiusInner = neighborRadius*neighborRadius/8;
			
		}
		
		
		System.out.println("radiusInner: "+Math.sqrt(radiusInner));
		//Lattice Site Assignment
		for(int i=0; i<siteIndex; i++){
			latticeSite[i] = coordinateDefinition.getLatticePosition(box.getLeafList().getAtom(i));
		}
		
		//Check for neighboring sites
		IVectorMutable distance = space.makeVector();
		neighborSite = new IVectorMutable[siteIndex][siteIndex];
		
		for (int i=0; i<siteIndex; i++){
			for (int j=0; j<siteIndex; j++){
				neighborSite[i][j]= space.makeVector();

			}
		}
		//Determine which are the neighboring sites
		for (int i=0; i<siteIndex; i++){
			
			int k=0;
			for(int j=0; j<siteIndex; j++){
			
				distance.Ev1Mv2(latticeSite[j], latticeSite[i]);
				box.getBoundary().nearestImage(distance);
				double distCheck = Math.sqrt(distance.squared());
				
				if (distCheck >0.00000001 && distCheck < neighborRadius-0.000001){<commit_msg>don't need to know about radiusInner<commit_after>package etomica.normalmode;

import etomica.api.IAtomList;
import etomica.api.IBox;
import etomica.api.IVectorMutable;
import etomica.lattice.crystal.Primitive;
import etomica.potential.Potential1;
import etomica.space.ISpace;

public class P1Constraint extends Potential1{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public P1Constraint(ISpace space, Primitive primitive, IBox box, CoordinateDefinition coordinateDefinition) {
		super(space);
		
		siteIndex = box.getLeafList().getAtomCount();
		latticeSite = space.makeVectorArray(siteIndex);
				
		double neighborRadius = primitive.getSize()[0];
		
		if(box.getLeafList().getAtomCount()==32){
			radiusInner = neighborRadius*neighborRadius/32;
			
		} else {
			radiusInner = neighborRadius*neighborRadius/8;
			
		}
		
		
		//Lattice Site Assignment
		for(int i=0; i<siteIndex; i++){
			latticeSite[i] = coordinateDefinition.getLatticePosition(box.getLeafList().getAtom(i));
		}
		
		//Check for neighboring sites
		IVectorMutable distance = space.makeVector();
		neighborSite = new IVectorMutable[siteIndex][siteIndex];
		
		for (int i=0; i<siteIndex; i++){
			for (int j=0; j<siteIndex; j++){
				neighborSite[i][j]= space.makeVector();

			}
		}
		//Determine which are the neighboring sites
		for (int i=0; i<siteIndex; i++){
			
			int k=0;
			for(int j=0; j<siteIndex; j++){
			
				distance.Ev1Mv2(latticeSite[j], latticeSite[i]);
				box.getBoundary().nearestImage(distance);
				double distCheck = Math.sqrt(distance.squared());
				
				if (distCheck >0.00000001 && distCheck < neighborRadius-0.000001){
{'fraction_non_alphanumeric': 0.12842105263157894, 'fraction_numerical': 0.021052631578947368, 'mean_word_length': 4.355877616747182, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6123824', 'n_tokens_mistral': 1311, 'n_tokens_neox': 1076, 'n_words': 220}